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
used in a variety of situations without having to create a new input file every time. -Original Message- From: Richard Fernandez [mailto:[EMAIL PROTECTED]] Sent: Friday, January 31, 2003 4:01 PM To: [EMAIL PROTECTED] Subject: Replacing a string in a bunch of files I just had a situat

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. > > -

e: Replacing a string in a bunch of files

2003-01-31 Thread Rob Dixon
Hi Richard. 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 lin

Replacing a string in a bunch of files

2003-01-31 Thread Richard Fernandez
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. ---8<-8<-