procmail
[Top] [All Lists]

Re: How to avoid s/\n/ /g when unfolding a header

2004-12-13 12:48:36
   sed "s/$NL//g"

Test this on your box first - newline handling in sed wasn't all that
portable.

However, I'd probably do the whole thing in tr (if I didn't use the
recursive INCLUDERC):

  av_SUBJECT = `formail -zx Subject | tr -d "[$WS$NL]"

Ehh, no. You can use tr -d to strip newlines, though to unfold
header lines you'd want to convert them into spaces (after stripping
leading white space). You can't use tr -d to remove white space as it
will makeyoursubject:looklikethis.

Btw your ideas on how to do things in procmail are often intrigueing...
and very useful. Thanks!

Volker

-- 
Volker Kuhlmann                 is possibly list0570 with the domain in header
http://volker.dnsalias.net/             Please do not CC list postings to me.

____________________________________________________________
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