General :: Put ELSE For Condition Block Of Procmailrc Recipes

May 2, 2011

How can I have ELSE condition in procmailrc I mean if the mail was from X and Subject has Y OR .... DO something ELSE DO SOMETHING ELSE. I do not want to use two different conditions for each state I want use just one condition and its ELSE because putting too recipes in procmailrc make it too slow .

View 2 Replies


General :: Set Variable In Procmailrc Action Block?

May 2, 2011

I want to know how to set variable in procmailrc action block or condition block I want to set a variable as a random file name to store emails but I don't know how to set a variable in procmailrc action block or condition block .this is my example:Quote:

* ^FROM.*


View 2 Replies View Related

General :: Warning Messages And Numerical Recipes Functions In C?

Jun 19, 2010

I am using some "Numerical Recipes in C" routines in my C code.(I am using ludcmp() & lubksb().)These are used to find inverse of a matrix.After compiling my c code, I get following warning messages.I have not understood them at all. What is the meaning of these and why did they pop up and how to remove them?

nrutil.h:11: warning: 'sqrarg' defined but not used
nrutil.h:14: warning: 'dsqrarg' defined but not used


View 7 Replies View Related

General :: Use RANDOM Number In Procmailrc?

May 2, 2011

I want to generate random name for email file name to prevent overwriting but $RANDOM ENV VARs does not work in it what can I do? this is my procmailrc:


SUBJECT=`formail -xSubject:`
FROM=`formail -xFrom:`
SUBJECT=`echo $SUBJECT | sed -e 's/ /-/g'`
FROM=`echo $FROM | sed -e 's/.*<//g' | sed -e 's/>//g' | sed -e 's/@/AT/g'`
STOREFILE=20`date +%y-%m-%d_%H-%M-%S`_${FROM}_${SUBJECT}_${RANDOM}${RAMDOM}

it works fine except ${RANDOM}${RAMDOM} and I do not want to use mktemp command .

View 8 Replies View Related

General :: Use Sender Or Any Thing In Header As Ame Of Storing Mail File In Procmailrc?

Apr 19, 2011

I want to know how can I use sender an receiver of the email in name of file for storing mail in procmailrc. I made one but it does not work.


SUBJECT=`formail -xSubject:` # regular field
FROM=`formail -rt -xTo:` # special case
:0 b
* ^FROM.*
| sed -e '/^To: +?[0-9]*$/,/report/!d' > ${FROM}${SUBJECT}--`mktemp 20`date +%y-%m-%d-%S--`XXXXXX`

it works when I use :


| sed -e '/^To: +?[0-9]*$/,/report/!d' > `mktemp 20`date +%y-%m-%d-%S--`XXXXXX`

View 1 Replies View Related

General :: Writing Else If Condition In Makefile?

Mar 18, 2010

I need to write an else-if condition in a makefile, and though the format is posted on several websites, nothing seem to be working, andI get an error everytime. Could anybody please write a small example with an else-if conditional in a maekefile?

View 1 Replies View Related

General :: Grep - Filtering Output By OR Condition

Aug 13, 2010

Is there some way to filter output of command by OR condition in Linux? There is filtering by AND condition with grep in way like:
ls -l | grep "^a" | grep "z$"

That says: list all files that beggins with "a" AND ends with "z" (so there is shorter way to write this: grep "^a.*z$", but it is not matter). Is there some way to perform test by OR condition? For example: files that starts exactly with "xen" OR files that ends exactly with ".rpm". But exactly, not something like:
grep "[xen]{0,3}.*[.rpm]{0,4}"

View 2 Replies View Related

General :: Command Line - Recursive Rm With Condition?

Mar 13, 2011

I have the following folder structure:

- folder1
- main1.x
- main1.y


So, how can I achieve this?

View 2 Replies View Related

General :: Syntax Error In Shell Script While Using If Condition?

May 28, 2011

I am writing a simple shell script where it checks the condition using if condition.

if [ $name == "JOHN" ] then admin='YES'; fi
if I use like this I am getting below error


View 1 Replies View Related

General :: Use A Global Variable To Apply A Condition Within A Script

Feb 28, 2011

I'm trying to use a global variable to apply a condition within a script.

The idea is to use this variable set to e.g. 1 or 2 to run a different part of the script accordingly. I can set the global variable with e.g.

export WL0=1

run my part of script, increment it by 1 with e.g.


but if I re-run the script my WL0 is still set to 1!

I've also tried to add an

export $WL0 at the very end of my script (after the math) but this doesn't change the global variable apparently.

View 15 Replies View Related

General :: Remort Loging - Check For A File Existince And Display A Message - If Condition

May 31, 2010

I want to ssh and check for a file, I hve came up with following, and its not working,

Is this possible or do I have to do this in a another way.

View 5 Replies View Related

Ubuntu Installation :: Number Of Partitions / Logical Volumes Can Create Using Partman-auto Recipes?

Mar 2, 2011

Is there a limit to the number of partitions/logical volumes you can create using the partman-auto recipes? If not, any thoughts on why my preseed using the values included below results in only a /boot partition and logical volumes root, swap, and user? Is there another way to achieve putting /, /tmp, /var, /usr, /usr_local /opt, etc on their own logical volumes with preseeding?

View 1 Replies View Related

Programming :: Suspend Pthreads Without Condition

Jun 29, 2010

I just started with Pthreads and don't really know much about it. I want to suspend pthreads but apparently, there is no such function as pthread_suspend. but I don't understand why we need both mutex and condition to suspend and resume a pthread. Is it possible to suspend and resume it without using conditions?

View 1 Replies View Related

Programming :: Awk: Swap Fields Given A Condition?

Oct 8, 2010

I have a file records as follows:

Jane John

How can I get that always first field be given name and second one be the mail address?

I've tried


awk '$1 ~ /@/ { a=$1 ; $1=$2; $2=a; print }' file

But that doesn't worked

View 5 Replies View Related

Programming :: Iptables Script With For Condition?

Apr 28, 2010

i have a question regarding the use of a statement, like following, in a iptables script.

MACS=$(grep -Ev "^#" $BLOCKMAC)


View 2 Replies View Related

Programming :: Update A Line Using AWK With Condition?

Jun 18, 2010

i have a host file called myhosts.txt as follow:

Quote: host1 host2 host3


In my script, i am using NSLOOKUP to get the ip address of a host that just rebooted and connected to my network (this part has been done).But now i want to check the myhosts.txt file if the host has the same or different IP address, if is different then myhosts.txt file must be updated with the new IP.i am using the following AWk command:


awk '/host4/{$1=val}{print}' val= /tmp/myhosts.txt

it prints on screen fine and i see the host4's ip address gets replaced but the actual file does not get updated with the new IP. I might need to use gsub?

View 11 Replies View Related

Fedora :: F15 Maintenance For Fast And Furious Condition

Jun 19, 2011

When I used windows, I used to perform following operations on regular basis:
1) disk cleanup
2) disk defragmentation
3) virus/spyware/malware check
4) deleting temp files left by deleted files
5) and many more.......
Does Linux system needs that to be done too? What should be done to maintain Linux in fast & furious it is now.....

View 10 Replies View Related

Programming :: Use If Else Condition When Returns Empty Data?

Apr 27, 2010

Let say I would like to check /etc/profile whether defined umask 022

umaskcheck=$(What to defined here?)
if [ What to define here? ]


View 2 Replies View Related

Ubuntu Installation :: Installing Counter Strike Condition Zero?

Jan 16, 2011

First of all, This is my first post in the forums, so - Hello all, nice to meet you. This is my first time with Ubuntu, and so, ran into a lot of problems. This problem is in installing counter strike. I know that there are a lot of guides and FAQ's online that give you lots of help on that, but I ran into an unique problem.

I installed the non-steam version of Counter Strike ( using wine ofcourse ). It created a shortcut in my desktop and I launch the counter strike game. I enter my cd key and then I select a profile, select a map, select the bots and then, it starts loading. After that, it stops half way and then it quits.

View 1 Replies View Related

Debian :: Ask A Dhcp Server To Respond A Petition Only If A Condition Happens?

Mar 16, 2010

I have two dhcp server (dhcp3) in the same network, this network is a link layer network so every host is seen as directly connected. The two servers have debian lenny and there are near 13 AP mikrotik to give connection to the XO laptops (from the project one laptop per child). This is for two public schools (each one with one server) that are connected via a p2p connection and each one provides internet for the school and outdoor too. The servers are also file servers, proxy, etc.

Each time a laptop asks for an IP, it sends a broadcast message and this petition gets to both servers, now a days the first server that reply is the one the laptop associate with. What I want to do is, knowing the bandwith use of the ADSL, the clients connected to the server, and the cost to the AP that the laptop associate with, decide wich is the best server to be connected to. What I want to achive is to balance the load and to decide the optimum connection, because now it could happen that one server is very loaded and the other is free. I tried to run dhcp with inetd and use tcp wrappers to invoke a script to check a condition before responding and, in case to be the best server, reply to the laptop, but i couldn't get the dhcp server to respond when I run it with inetd. here is my inetd.conf

bootps dgram udp wait root /usr/sbin/tcpd dhcpd3

View 1 Replies View Related

Security :: Filter Condition Based On Full Hostname?

May 19, 2010

How to filter condition based on full hostname? ie. allow inbound packets to port 25 if the packet comes from [URl]..

View 1 Replies View Related

Programming :: Bash: Repeat Commands Until A Condition Is Matched?

Mar 8, 2011

need to modify some scripts to repeat the commands in them until a variable returns a proper value. I need it to add some redundancy to some scripts i use to upload files to a remote server.This is an example of a portion of those scripts:

################## site UPLOAD ##################
site_login=$(curl -c $site_cookie -L -F user=$site_user -F pass=$site_password -F


View 4 Replies View Related

Programming :: BASH Conditionals - Passing Condition As Variable ?

Sep 17, 2009

I'm trying to implement an assert function similar to:[url]

However, I'm having trouble with file existence testing when the file name has a space in it.

I have distilled the problem down to the following:

This code works as expected, printing 'yes' if '~/test file' exists, and no if not.


However, this code gives an error.


The error:


Which tells me that it is splitting ["~/test file"] into ["~/test] and [file"]. Why? Is there a way around this?

Note that if you simply use a file path without a space, both cases work perfectly. Is this a BASH bug possibly? I just can't understand why the first would work, but the second wouldn't.

View 8 Replies View Related

CentOS 5 :: Under High UDP Traffic Condition - Cannot Receive UDP Packet

Jan 25, 2011

Under high UDP traffic condition, we find we cannot receive UDP packet (can be captured by tcpdump) from socket neither use bare "recvfrom" nor "select recvfrom " pair. Is there any similar problem reported from user?

Any tunning or socket establish option can help?

Or is there any improvement available from the latest version?

our using linux version is CentOS 5.5

ethernet driver version is Intel (R) Gigbait Ethernet Network Driver version - 1.3.16-k2

View 1 Replies View Related

Ubuntu Servers :: 10.10 Randomly Not Mounting NFS Shares - Race Condition?

Dec 16, 2010

NFS share is up. it's set to r/w. This is Ubuntu 10.10 NFS4 i believe. exports file looks like this;
/data/feeder,async,no_root_squash,no_subtree_c heck)

on the client,
/etc/fstab looks like this; /opt/feeder nfs rw 0 0
when I ls -la into /opt/feeder I see all the persmissions as:
4294967294:4294967294 instead of root:root

View 8 Replies View Related

Programming :: Create Awk Sript For Generating Two Files From A File Checking A Condition ?

Mar 3, 2010

I have a csv file like, having HDR segment and multiple LIN01 segment in each line:like

Here i want to split file in two, one having LIN01 segment which have LR at end, and one which have LF at end in LIN01 segment.

Is it possible to created awk or shell script for this?

View 3 Replies View Related

General :: Block Particular Ip From The Server?

Jul 23, 2011

I have recently set up a new site, and I find recently the host is not quite responding to request when I ssh to the host or just hit my site's url. I think I could be under some kind of DoS attack, because I do not think google's crawling can cause that problem. Is there any way I can figure out who is doing that? I am not quite expert for apache, and I just barely know how to install it.

Also, how can I block particular ip from the server.

View 1 Replies View Related

General :: How To Block Orkut

May 30, 2010

I m using FC10 in my laptop. I have 3 users (including root), and i m using internet browseing, through broadband connection (like, TATA Fotone), through my USB port. I want to block only "orkut, & facebook" to my user1 and user2.

View 2 Replies View Related

General :: IPCop BOT Does Not Block Anything?

Mar 14, 2011

After installing BOT everything was blocked when I enabled BOT.After trying out some rules I can't block anything anymore.What have I done wrong?I have tried to remove all rules but still I have full access to Internet.Is there a IPCop BOT for Dummies to buy or something similar on Internet?

View 1 Replies View Related

General :: Which Command Is Used To Block Tcp Port

Mar 26, 2010

i want to block tcp port with the help of iptables commands linux.which command is used for this purpose?

View 2 Replies View Related

Copyrights 2005-15, All rights reserved