procmail
[Top] [All Lists]

Re: using LOG= in recipes, newline character and mailstat

2006-01-06 14:30:45
Michael J. Wise wrote:

TRAP='sed -n '"'"'/^$/'"'"'"{h;s#^#Folder: $LASTFOLDER#;p;g;p;q;};p;"'

That's deep SED-magick-moste-e-vile, but....
The end result is to dump ALL the headers into the logfile.

What's your goal there, to copy all the headers into the logfile, append

Folder: $LASTFOLDER

and close with a blank line?

TRAP='formail -X "" ; echo ; echo Folder: "$LASTFOLDER" ; echo'

or if you're married to sed,

TRAP='sed -e /./b -e "s/^/Folder: $LASTFOLDER" -eG -eq'

and look, that sed command has no characters from $SHELLMETAS.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail