Michael Lazin on 3 Dec 2009 15:31:03 -0800

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] sed newbie question

Hi, I am interested in writing a shell script that will remove malicious iframes from peoples websites.  I am a scripting newbie and a sed newbie.  I decided to start by playing around with it. 

sed '/iframe/d' test.html

cat test.html
<iframe>frame src="" href="http://evil.com/test">http://evil.com/test</iframe>

Why didn't this sed line delete the iframe line from my test file?

Michael Lazin

ASCII ribbon campaign ( )
against HTML e-mail    X
                                 / \
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug