Re: awk/shell-Rätsel

From: Nicolas Rachinsky <fbsd-de-0(at)ml.turing-complete.org>
Date: Wed, 14 Jan 2009 08:01:04 +0100

* Marc Santhoff <M.Santhoff(at)web.de> [2009-01-14 06:56 +0100]:
> #!/bin/sh
>
> awk '{ gsub(/</, "\\&lt;"); \
> gsub(/>/, "\\&gt;"); \
> gsub(/&/, "\\&amp;"); \
> gsub(/"/, "\\&quot;"); \
> gsub(/\'/, "\\&apos;"); \
         gsub(/'"'"'/, "\\&apos;"); \
oder
         gsub(/'\''/, "\\&apos;"); \
> print }' -

ungetestet

Nicolas

-- 
http://www.rachinsky.de/nicolas
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Wed 14 Jan 2009 - 08:01:10 CET

search this site