Thanks Shawn...that worked...
I think it was everything to do with double quotes on windows.
-Original Message-
From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 23, 2006 11:50 PM
To: beginners@perl.org
Subject: Re: Perl one liner
On Tue, 2006-23-05 at 11:36
On Tue, 23 May 2006, Nagasamudram, Prasanna Kumar wrote:
|I'm trying to do a find and replace on the file content using the
|following command on windows.
[snipped]
|perl -p -i.bak -e 's/FOO/BAR/g' abc.txt
[snipped]
Hi,
Try:
$ perl -pi.bak -e 's/FOO/BAR/' abc.txt
Note: abc.txt has BAR,
On Tue, 2006-23-05 at 11:36 -0700, M Senthil Kumar wrote:
On Tue, 23 May 2006, Nagasamudram, Prasanna Kumar wrote:
|I'm trying to do a find and replace on the file content using the
|following command on windows.
[snipped]
|perl -p -i.bak -e 's/FOO/BAR/g' abc.txt
[snipped]
Hi,
On 4/25/05, Larsen, Errin M HMMA/IT [EMAIL PROTECTED] wrote:
Hi Perlers,
I typically will type the following to collect a specific column of
data from some command's output:
# some_command | awk '{print $4}'
I wanted to start using perl one-liners more often, so I thought I'd
try
On 4/25/05, Jay Savage [EMAIL PROTECTED] wrote:
On 4/25/05, Larsen, Errin M HMMA/IT [EMAIL PROTECTED] wrote:
Hi Perlers,
I typically will type the following to collect a specific column of
data from some command's output:
# some_command | awk '{print $4}'
I wanted to start
On Mon, Apr 25, 2005 at 01:45:15PM -0500, Larsen, Errin M HMMA/IT wrote:
Hi everyone,
Here is an example from the perlrun perldoc page:
perl -ane 'print pop(@F), \n;'
is equivalent to
while() {
@F = split(' ');
print pop(@F), \n;
}
My
-Original Message-
From: Paul Johnson [mailto:[EMAIL PROTECTED]
Sent: Monday, April 25, 2005 1:53 PM
To: Larsen, Errin M HMMA/IT
Cc: beginners@perl.org
Subject: Re: Perl One-liner de-compile?
On Mon, Apr 25, 2005 at 01:45:15PM -0500, Larsen, Errin M
HMMA/IT wrote:
Hi
Larsen, Errin M HMMA/IT mailto:[EMAIL PROTECTED] wrote:
: Or is the @f array a secret array I'm not cleared to know about?
We could tell 'ya, but then we'd have to kill 'ya.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Apr 25, Larsen, Errin M HMMA/IT said:
$ perl -MO=Deparse -ane 'print pop(@F), \n;'
Note the @F, it's capital-F.
# perl -MO=Deparse -nae 'print $f[4]' /some/directory/somefile
You're using a lowercase @f here.
LINE: while (defined($_ = ARGV)) {
our(@F) = split( , $_, 0);
print $f[4];
-Original Message-
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]
Sent: Monday, April 25, 2005 2:42 PM
To: Larsen, Errin M HMMA/IT
Cc: beginners@perl.org
Subject: RE: Perl One-liner de-compile?
SNIP
You're using a lowercase @f here.
SNIP
Perl will magically
Larsen, Errin M HMMA/IT wrote:
Ok ... So I tried this:
# perl -MO=Deparse -nae 'print $f[4]' /some/directory/somefile
^
LINE: while (defined($_ = ARGV)) {
our(@F) = split( , $_, 0);
print $f[4];
^
}
-e syntax OK
On Tuesday 28 May 2002 9:42 am, Gary Stainburn wrote:
Hi all,
Can anyone give me the one-liner to replace
find . -type f -exec rm {} \;
with
find . -type f |perl -?
to improve the speed when deleting a large squid cache
sorry, I forgot to include how far I've got. Where's
on Tue, 28 May 2002 08:42:03 GMT, [EMAIL PROTECTED] (Gary
Stainburn) wrote:
Hi all,
Can anyone give me the one-liner to replace
find . -type f -exec rm {} \;
with
find . -type f |perl -?
to improve the speed when deleting a large squid cache
perldoc find2perl
On Tuesday 28 May 2002 10:00 am, Felix Geerinckx wrote:
on Tue, 28 May 2002 08:42:03 GMT, [EMAIL PROTECTED] (Gary
Stainburn) wrote:
Hi all,
Can anyone give me the one-liner to replace
find . -type f -exec rm {} \;
with
find . -type f |perl -?
to improve the
Gary Stainburn wrote:
Hi all,
I added a chomp giving -
find . -type f|perl -ne 'chomp ; unlink||die $_ : $!\n'
You could avoid the pipes and try this instead
perl -MFile::Find -e 'find (sub {unlink|| die $File::Find::name : $!\n if (-f)},
.)'
and it worked.
Gary
On Tuesday 28 May
At 04:58 PM 11/14/01 -0500, Thomas Lewis wrote:
Hello all. I have a weird problem. When I run this PERL one-liner by
hand it prints everything within the appropriate range...
perl -ne 'print if /NTHOST\) Total/ .. /ANR0403I/'
/tmp/TIVOLI.OUT-activity-report
This prints up the summary of a
[on list]
On Apache Unix, this just hangs and does nothing and I have to do
control d to kill it!
perl -wpi.org -e s@/cgi-bin/forum_idx.pl@/fakecgi/fakeforum_idx.pl@
It doesn't hang, it's waiting for input.
Other notes:
1. A backup file given .org as its extension? Weird. Most people use
Any idea why this aint working?
perl -wpi.org -e s@/cgi-bin/forum_idx.pl@/fakecgi/fakeforum_idx.pl@
no quotes around the string to be evaluated (the s@...@...@ bit).
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
18 matches
Mail list logo