(An incomplete version of this may have gone out; if that happened, sorry
for the duplication.)
This seemed to work:
sed -e '/[^ ]/,$ !d; :cycle' \
-e 's/[ ]*$//; /[^\n]$/b' \
-e 's/^\(\n\)\n*/\1/; N; b cycle'
It also kills any trailing blank lines, though. I'm trying to think of the
simplest change to fix that.
sed -e '/[^ ]/,$ !d; :cycle' \
-e 's/[ ]*$//; /[^\n]$/b' \
-e 's/^\(\n\)\n*/\1/; $ P; N; $ !b cycle'
That should keep one trailing blank line (if there are any to start).
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail