procmail
[Top] [All Lists]

Re: blank line consolodation/strippage

2001-11-19 16:29:27
Avoiding your main question, since David has answered that far better
than I could...

(this is the sed from the top of this doc, minus the first invocation):

| sed -e '/^$/N \
/^\n$/{N \
/^\n\n$/D \
}'

The procmail log reports:
         sed: -e expression #1, char 6: Extra characters after command
...
Is there some trick to using procedural sed commands such as these from 
procmail, or is my sed (gnu, 3.02) being argumentative where a possibly 
newer one might not?

You can write that without newlines (valid in GNU sed 3.02) as

  | sed -e '/^$/N; /^\n$/{N; /^\n\n$/D; }'

and avoid the problem that way.

Martin
-- 
Martin McCarthy                 /</                  PGP key available
    `Procmail Companion'        \>\  http://www.ancient-scotland.co.uk
     Addison Wesley             /</    http://www.ehabitat.demon.co.uk
_______________________________________________
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>