procmail
[Top] [All Lists]

if variable is not set....

1997-07-12 22:08:00

Perhaps I'm just too sleepy to figure this out, but how can I do this:


if [ "$VAR1" = "" ]
then
        OTHERVAR=x
else
        OTHERVAR=y
fi

I am writing an auto-ack recipe, which files the mail, and sends an ack  
email.  However, this makes LASTFOLDER= my entire recipe for replying, rather  
than the folder it actually went to.

So I put the real LASTFOLDER into another variable called REALFOLDER and  
want to use

TRAP='\
echo "\
_________ NEW $TYPE MESSAGE FROM: $FROM
To/Cc   $TO / $CC
Subject $SUBJECT
Date    $DATE
Size     $SIZE
ID      $ID
_________ MESSAGE WENT TO:  $LASTFOLDER
"'

to log.... However, if "REALFOLDER" has a value, then I want to use the  
value of REALFOLDER for LASTFOLDER in the TRAP statement.

Does this make sense?

TjL, sleepy and heading for bed

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