Chetak Sasalu wrote:
I came back to office after an extended weekend and realized that my words
might have irked some of you.
'Irked' is a good word. I'll happily forgive just because of that, plus the fact
that I know that I also can be irksome.
Rob
--
To unsubscribe, e-mail: [EMAIL
Hello,
I came back to office after an extended weekend and realized that my
words might have irked some of you.
But let me explain.
I agree, acquiring the 'mental tools' to do it myself is always the best
way. I had tried out a few sample scripts
myself (most of them failed). After
John W. Krahn wrote:
Chetak Sasalu wrote:
Hi,
Hello,
I have to search and replace 'foo' to 'bar' in all the files in a
directory(has subdirectories).
The files are about 40k in size.
On the command line I would do it as,
find ./mydir/ -type f -print | xargs perl -pi -e
Jan Eden wrote:
Rob Dixon wrote:
John W. Krahn wrote:
use File::Find;
local ( $^I, @ARGV ) = '';
find( { no_chdir = 1, wanted = sub { -f and push @ARGV, $_ } }, './mydir' );
s/foo/bar/g, print while ;
Thanks John.
I missed the 'has subdirectories'.
I did not and came up
Rob Dixon wrote:
Jan Eden wrote:
Rob Dixon wrote:
John W. Krahn wrote:
use File::Find; local ( $^I, @ARGV ) = ''; find( { no_chdir = 1,
wanted = sub { -f and push @ARGV, $_ } }, './mydir' );
s/foo/bar/g, print while ;
Thanks John.
I missed the 'has subdirectories'.
I did not and came up
[EMAIL PROTECTED] wrote:
Hi,
I have to search and replace 'foo' to 'bar' in all the files in a
directory(has subdirectories). The files are about 40k in size.
What is the most efficient way to implement this inside a perl
program ? There are about 30 files to be processed. I went through
Please disregard my post, I mixed up the magic and the less magic FILEHANDLE.
--
These are my principles and if you don't like them... well, I have others. - Groucho
Marx
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Chetak Sasalu wrote:
I have to search and replace 'foo' to 'bar' in all the files in a
directory(has subdirectories).
The files are about 40k in size.
On the command line I would do it as,
find ./mydir/ -type f -print | xargs perl -pi -e 's/foo/bar/'
No backup of the original files
On 02/06/04 07:45, [EMAIL PROTECTED] wrote:
PS: I see this term 'foo' 'bar' in many programming books, what is the
etymology of this?
It is derived from a technical acronym FUBAR - [EMAIL PROTECTED] Up Beyond All
Repair (or Recognition). 'foo', 'bar' is just a play on the original
acronym - A
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
:
: I went through perldoc perlrun and saw the code.
:
: I thought it as a criminal waste of time to try and
: modify that code for my purpose, when I can ask you
: folks :-)
Perhaps I am misunderstanding you, but that sounds
to me like you would
. Clarkson [mailto:[EMAIL PROTECTED]
Sent: Friday, February 06, 2004 9:54 AM
To: [EMAIL PROTECTED]
Subject:RE: Search Replace in multiple files
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote
Chetak Sasalu wrote:
Hi,
Hello,
I have to search and replace 'foo' to 'bar' in all the files in a
directory(has subdirectories).
The files are about 40k in size.
On the command line I would do it as,
find ./mydir/ -type f -print | xargs perl -pi -e 's/foo/bar/'
No backup of the
Ned Cunningham wrote:
Wouldn't it be better to not waste your time with this kind of response???
Ned Cunningham
POS Systems Development
Hi Ned,
I'd say that it depends on whether you see the OP as a potential programmer. If
so, then no, it would not be better. If the OP takes a hint and
13 matches
Mail list logo