On 10 Nov, Professional Software Engineering wrote:
| At 15:49 2001-11-10 -0500, Don Hammond wrote:
|
| >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'
|
| The sed is also dealing with compacting multiple spaces (and importantly,
| as corrected below, or tabs) into one, then replacing the single space with
| a newline.[...]
|
| Anyway, this is intended to deal with "variance" in the input subject,
| where you wouldn't want extra blank lines in your output. If tr dealt with
| "combo" character repeats, it'd definatley be a better choice.
|
Sorry. I didn't specifically say so, but I understood you were
"normalizing" whitespace before translating to \n. That's what tr -s
does, again, if your tr supports it. It will "replace sequence of
characters with one". So, including tabs now ...
|( echo "$WHITE" |tr -s ' \t' '\n' ) >> $WHITELIST
will do what you want, unless I'm still missing something. A couple
quick tests tells me it'll work with <space> and <tab> in any
combination (multiple, mixed, or not) as delimiters, and multiple
delimiters need not be identical.
--
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