procmail
[Top] [All Lists]

Tip: sed and attachment headers

2002-06-24 09:06:27

        I would like to share a great URL:
                http://www.student.northpark.edu/pemente/sed/sed1line.txt
        A collection of one-line-sed-programs, collected by Eric Pement.

        The following command will iron out the well known MIME "Content-.."
        entries and allow the next recipes to be more simple readable and
        easy to maintain:

sed -e ':a' -e '$!N;s/^\(Content-.*\)\n[     ][      ]*/\1 /;ta' -e 'P;D'

        You will get one flat horizontal "^Content-" lines.  No more
        learn the RFC  (;-)

        The characters ";" "!" are internal for sed(1) for this reason
        take David Tamkin advise and temporary cancel the SHELLMETAS
        to avoid shell calling.

        I checked it on Solaris7 and RH7.2.  Dose it work in others?

Enjoy
 Udi


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