procmail
[Top] [All Lists]

Re: How to remove multiple newlines

2004-07-15 17:12:59
Where I had,

>> sed '/./,/^$/!d'

Kreemy asked,

I have to say I don't understand that syntax at all.  You have four
terms in there.

No, one term: /./,/^$/!d and no more. If you want to understand that, read the sed man page. It worked for me.

and, of course, when you feed the body you don't get the initial blank
line, right?  So all of this is to remove a closing blank line?

No, it's to collapse any runs of two or more consecutive blank lines into one each. It doesn't remove the closing blank line, in fact.

____________________________________________________________
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