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