On 10 Nov, Professional Software Engineering wrote:
| [...]
| :0
| * ^Subject:[ ]*add2white[ ]*\/[^ ].+
| {
| WHITE=$MATCH
| LOG="WHITELIST added $WHITE
| "
| # the sed line *IS* broken in two, and the second
| # line shouldn't be indented.
| :0i:whitelist.lck
| |(echo $WHITE | \
| sed -e "s/ */ /g" -e "s/ /\\
| /g" ) >> $WHITELIST
| }
|
| [...]
|
| If someone has a less ugly equivalent to the sed above (which because it is
| inserting a newline, requires that linebreak), I'm all ears.
|
If I understand correctly, there may be more than one addition to the
whitelist (space delimited). Right? If your tr groks "\n" or "\012" and
supports -s, --squeeze-repeats (GNU tr does):
echo "$WHITE" |tr -s ' ' '\n'
--
Reply to list please, or append "6" to "procmail" in address if you must.
Spammers' unrelenting address harvesting forces me to this... reluctantly.
/"\
Don Hammond \ / ASCII Ribbon Campaign
Raleigh, NC US X Against HTML Mail,
/ \ and News Too
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail