| Hrm. I don't think so.
You're right, Bart, but then I thought of the same thing you did:
| However, I see now there *is* a bug ... if the N consumes a non-blank line
| that is immediately followed by a blank line, all following blank lines
| are discarded.| So the full expression to squash whitespace as well,
becomes (line broken
| to try to avoid wrapping):
|
| sed -n -e ': 1;\
| /[^ ]/,/^[ ]*$/{s/^[ ]*$//;p;/^$/!d;n;s/^[ ]*$//;/./b 1;p;}'
[The contents of the brackets were pretty much mangled in transit; surely
Bart sent them as space-tab or caret-space-tab.]
Inside apostrophes you wouldn't need that backslash; in fact, it might hurt.
My experience with seds that honor apostrophes is that labels need to be
terminated with newlines and cannot take apostrophes, so without testing the
code itself I can tell you that it needs to be changed at the least to be
written like this (though perhaps procmail would have removed that
backslash, I'm not sure what happens inside apostrophes; I hesitate to play
with that function):
sed -n -e ': 1' -e \
'/[^ ]/,/^[ ]*$/{s/^[ ]*$//;p;/^$/!d;n;s/^[ ]*$//;/./b 1' \
-e 'p;}'
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail