On Apr 08 2004 16:06, dgc@xxxxxxxxxxxx sent: > I would look at $editor: perhaps set it to the name of a script that > performs the transformation you want (using sed, perl, python, whatever Now there's an idea I hadn't thought of, but which makes a lot of sense. Thanks for the suggestion! For the benefit of the archives, here is the essense of what I came up with after a bit of experimenting: perl -e 'while(<>) { while(/^(>+ )+/) { ~s:^(>+) (^>.+)?:$1$2:; } \ ~s:^(>+) *(^>+)?:$1 $2:; ~s:^(>*) +$:$1:; print; }' This little oneliner probably isn't the most efficient way of doing things, but it seems to get the job done without getting caught in any infinite loops at least. -- /"\ Michael Kjörling - michael@xxxxxxxxxxxx - SM0YBY QTH JO89XI ^..^ \ / OpenPGP: 3723 9372 c245 d6a8 18a6 36ac 758f 8749 bde9 ada6 \/ X World Wide Web: http://michael.kjorling.com/ - 0740 458 634 / \ ASCII Ribbon Campaign - Against HTML Mail, Proprietary Attachments
Attachment:
pgpCadMl0E2Gg.pgp
Description: PGP signature