Forum Moderators: bakedjake

Message Too Old, No Replies

How to find/replace html code on hundreds of files on server?

find replace code in files

         

PainKiller

6:08 pm on Jul 31, 2007 (gmt 0)

10+ Year Member



Please help. I need to delete some identically lines of html code from hundreds of web pages. Is there any solution to do that automatically on the server (fedora6)?

Any help appreciated ...

appi2

8:21 pm on Jul 31, 2007 (gmt 0)

10+ Year Member



Use sed.
And as for how google.

LisaWeber

8:28 pm on Jul 31, 2007 (gmt 0)

10+ Year Member



BK replacem

wheel

3:21 pm on Aug 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From the command line:
perl -i -p -e 's/old text/new text/g' *.html

Any funky characters in the code to find, like $'s or commas and the like, precede them with a \

sabs

5:31 pm on Aug 2, 2007 (gmt 0)

10+ Year Member



yes u r right this will definitely solve the issue......i belive