On Mon, 5 Aug 2002, Hanspeter Roth wrote:
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.
Well, this is not the right mailing-list for this questions.
I'll finish my part by reminding an old message that I sent
regarding great URL for sed(1) one line commands because I think
it can help here too.
http://www.student.northpark.edu/pemente/sed/sed1line.txt
Bye,
Udi
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
--
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail