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