Forum Moderators: coopster & phranque

Message Too Old, No Replies

Command line search and replace

In Windows

         

ogletree

11:53 pm on Jul 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have perl installed on windows server 2000. I am having prolems doing a simple command line search and replace. I run this from the directory that 1.html is located. It runs and creates a .bak file but does nothing.

perl -pi.bak -e 's/"test"/"test1"/g;' 1.html

ogletree

4:15 pm on Jul 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Ok found my problem.

perl -pi.bak -e "s/test/test1/g;" 1.html

I guess windows does not like the single quote. It works in UNIX.