procmail
[Top] [All Lists]

Variable Use

1997-10-21 12:28:24
Hi, I would like to do the following:
when an email comes in, I would grep it with the
regex below.  If it finds the line(s) it will set
JUNK >= 1 if not JUNK = 0.

This may sound stupid, but how can I use JUNK in
a recipe to send emails to dev/null or a file.
I know how to send the email to a file but how
do I check the variable JUNK for either 0 or >= 1 ?

     JUNK=`grep -ci "Pro Bulk E"`


  :0
     * JUNK ?? (.|$) # this checks to see if its null?
       /dev/null

<Prev in Thread] Current Thread [Next in Thread>