Forum Moderators: coopster

Message Too Old, No Replies

Script to search and replace in multiple *. html files

How?

         

Baron3000

5:53 pm on May 23, 2004 (gmt 0)

10+ Year Member



I have >200 static pages where I want to replace the
"JScript.Encode" to "JavaScript"
Any ideas how to do this?

Romeo

6:19 pm on May 23, 2004 (gmt 0)

10+ Year Member



Hi Baron,

on a unix box, you may try the following one-liner on the command prompt to do this:

find . -type f -name "*html"? xargs perl -pi -e 's/JScript\.Encode/JavaScript/g';

Regards,
R.

[edited by: Romeo at 6:31 pm (utc) on May 23, 2004]

Romeo

6:21 pm on May 23, 2004 (gmt 0)

10+ Year Member



I just see that the board software apparently mangles some characters:
In my previous posting, the character between the "*html" and xargs should be a vertical bar (pipe) instead of a "?".

Regards,
R.