procmail
[Top] [All Lists]

Re: deleting mailing list footer

2002-08-05 12:22:10
  On Aug 05 at 21:24, Udi Mottelo spoke:

On Sun, 4 Aug 2002, Hanspeter Roth wrote:

Is there a recipe to delete the remaining trailing blank lines?

      Yes:

sed -e :a -e '/^\n*$/{$d;N;ba' -e '}'

Wow. Amazing. 
I just don't understand how the conditional Next gets triggered.

I have change my mind. I want to just squeeze trailing blank lines to
a single one.
Now I've created something which seems to work:

/^$/{
n
/^$/{
:loop
N
/\n$/b loop
/./!d
}
}

-Hanspeter
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>