At 02:54 PM 7/4/98 +0300, era eriksson wrote:
ME=lex4nm1(_at_)unix(_dot_)ccc(_dot_)nottingham(_dot_)ac(_dot_)uk
YOU=`formail -XFrom: | sed -e 's/\([^<]*\)<[^<>]>[ ]*$/\1/'`
:0whc:vacation.lock
* $ ^TO($\ME)\>
* ! ^FROM_DAEMON
* ! $ ^X-Loop: $\ME
* ? test -r $HOME/.vacation.msg
* ! ? formail -rD 8192 $HOME/procmail/vacation.cache
* ^Subject:[ ]*(\<*Re:?)*[ ]*\/([^r :]|r[^e]|re[^: ])?.*
| ( formail -r -A "Precedence: junk" -A "X-Loop: $ME" \
-I "From: Natu Mwamba (autoresponder) <$ME>" \
-I "Subject: Automatic reply Re: $MATCH" ; \
sed -e 's/\$SUBJECT/'"$MATCH"/ -e 's/\$YOU/"$YOU"/ $HOME/.vacation.msg )
\
| $SENDMAIL $SENDMAILFLAGS -t
Note that the second -e on the sed has an unmatched '
Probably it should be ... -e 's/\$YOU/'"$YOU"/
Question: given the single quote marks, why the backslash escape on
$SUBJECT and $YOU in the sed command?
Cheers,
Stan