Re: Replacing a string in a bunch of files

2003-02-03 Thread John W. Krahn
Victor Tsang wrote: > > Mu... I have a quicker way, try this. > > cat FileContainFileNames | xargs -n1 perl -pe "s/oldstring/newstring/g" > -i Another nomination for a UUOC award. :-) xargs -n1 < FileContainFileNames | perl -i -pe "s/oldstring/newstring/g" John -- use Perl; program fulfillm

Re: Replacing a string in a bunch of files

2003-02-03 Thread Victor Tsang
Mu... I have a quicker way, try this. cat FileContainFileNames | xargs -n1 perl -pe "s/oldstring/newstring/g" -i Tor. Richard Fernandez wrote: > > I just had a situation where I needed to replace one string with another > string in 200 files. > This is what I came up with, but I know there ha

Re: Replacing a string in a bunch of files

2003-02-01 Thread Rob Dixon
Jason Wozniak wrote: > I was attempting to produce the file list by piping the output of a > find command. See my previous email for the problem I'm having with > that... > > I guess the question I would have is how you are producing the list in > "myfiles"? > > in my case I suppose I could go to

RE: Replacing a string in a bunch of files

2003-02-01 Thread Jason Wozniak
I was attempting to produce the file list by piping the output of a find command. See my previous email for the problem I'm having with that... I guess the question I would have is how you are producing the list in "myfiles"? in my case I suppose I could go to the directory that has the glog.log

Re: Replacing a string in a bunch of files

2003-01-31 Thread John W. Krahn
Richard Fernandez wrote: > > I just had a situation where I needed to replace one string with another > string in 200 files. > This is what I came up with, but I know there has to be a better way. Below > is my code. > > "myfiles" contains a list of the files I need to scrub, one per line. > > -