procmail
[Top] [All Lists]

Re: Using sed

2001-04-28 01:55:19
Others have suggested elegant solutions to the original problem.  I
thought I'd mention a handy sed trick to keep in mind.  If it's
possible your input (in the original post, it was the subject line)
might contain characters which would break subsequent sed
expressions, you can sanitize the output with something like: 

   XXX=`... | sed -e '...'  -e 's!/!\\\/!g'`

telling sed to use '!' as the delimiter for this expression,
and having sed add a '\' before each instance of '/' (in this
case the character we're sanitizing) it finds in the string.

FWIW,

Jim
_______________________________________________
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>