procmail
[Top] [All Lists]

Re: echo expands * in string to list of file names

2002-01-15 12:09:32
I have the following procmail recipe, and it's not behaving as I want 
when asteriks (*) are in the Subject line.

SENDER  = `formail -rtzx To:`
SUBJECT = `formail -zxSubject:`
TODAY   = `date "+%Y-%m-%d %T"`

:0 hwic: log.lock
|  echo -e $TODAY "\t" $SENDER "\t" $SUBJECT >> log-addmsg

Nothing fancy needed.  Just:

  | echo -e "$TODAY\t$SENDER\t$SUBJECT" >> log-addmsg

This is a shell issue - the man page for your shell should have details
on how the quoting works.

Hope that helps,
Martin
-- 
Martin McCarthy                 /</                  PGP key available
    `Procmail Companion'        \>\  http://www.ancient-scotland.co.uk
     Addison Wesley             /</    http://www.ehabitat.demon.co.uk
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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