Re: Counting lines on a file

2001-05-05 Thread Jos I Boumans
umans - Original Message - From: "Jeff Pinyan" <[EMAIL PROTECTED]> To: "Jos I Boumans" <[EMAIL PROTECTED]> Cc: "Susan Richter" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, May 05, 2001 5:05 PM Subject: Re: Counting lines on a

Re: Counting lines on a file

2001-05-05 Thread Casey West
On Sat, May 05, 2001 at 12:12:08AM -0400, Jeff Pinyan wrote: : On May 4, Brett W. McCoy said: : : >On Fri, 4 May 2001, Susan Richter wrote: : > : >> Can someone tell me what command I can use to go to machines and count the : >> lines on a certain file? I have log files for every machines (20 al

Re: Counting lines on a file

2001-05-05 Thread Jeff Pinyan
On May 5, Jos I Boumans said: >open(I,"$ARGV[0]"); >my @foo = ; >print scalar @foo; It is considered a dubious practice to read a file into an array; this can use of lots of memory. It is particularly wasteful if the goal is just to find out how many lines there are. Another wasteful use is:

Re: Counting lines on a file

2001-05-05 Thread Brett W. McCoy
On Sat, 5 May 2001, Paul wrote: > > --- Mike Lacey <[EMAIL PROTECTED]> wrote: > > my $file = $ARGV(0); > > carefull there -- $ARGV(0) will probably err. >^ ^ > use $ARGV[0] instead. That's what I meant, as I had posted in a followup message. -- Brett

Re: Counting lines on a file

2001-05-05 Thread Paul
--- Mike Lacey <[EMAIL PROTECTED]> wrote: > my $file = $ARGV(0); carefull there -- $ARGV(0) will probably err. ^ ^ use $ARGV[0] instead. ^ ^ __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great price

Re: Counting lines on a file

2001-05-05 Thread Jos I Boumans
ou dont want to discriminate on newlines but on say, spaces or so. Regards, Jos Boumans - Original Message - From: "Susan Richter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 04, 2001 8:56 PM Subject: Counting lines on a file > Can someone tell me what

Re: Counting lines on a file

2001-05-04 Thread Jeff Pinyan
On May 4, Brett W. McCoy said: >On Fri, 4 May 2001, Susan Richter wrote: > >> Can someone tell me what command I can use to go to machines and count the >> lines on a certain file? I have log files for every machines (20 all >> together). Each log file has lines that would equate to the files t

Re: Counting lines on a file

2001-05-04 Thread Brett W. McCoy
On Sat, 5 May 2001, Mike Lacey wrote: > my $file = $ARGV(0); Oops, that should be $ARGV[0]; -- Brett http://www.chapelperilous.net/btfwk/ Men often believe -- or pretend -- that the "Law"

Re: Counting lines on a file

2001-05-04 Thread Mike Lacey
my $file = $ARGV(0); hmmm -- try my $file = shift; - Original Message - From: "Brett W. McCoy" <[EMAIL PROTECTED]> To: "Susan Richter" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, May 05, 2001 1:26 AM Subject: Re: Counting lines o

Re: Counting lines on a file

2001-05-04 Thread Me
> >Can someone tell me what command I > >can use to go to machines and count the > >lines on a certain file? perl -ne '/\n/ and $i++; eof and print $i' where isn't really in <>s. (Btw, be wary of using eof(). Otoh, sometimes it's just what you want.)

Re: Counting lines on a file

2001-05-04 Thread Brett W. McCoy
On Fri, 4 May 2001, Susan Richter wrote: > Can someone tell me what command I can use to go to machines and count the > lines on a certain file? I have log files for every machines (20 all > together). Each log file has lines that would equate to the files that it > found. I need to know how m

Re: Counting lines on a file

2001-05-04 Thread Jeff Pinyan
On May 4, Susan Richter said: >Can someone tell me what command I can use to go to machines and count the >lines on a certain file? I have log files for every machines (20 all >together). Each log file has lines that would equate to the files that it >found. I need to know how many files ar

Counting lines on a file

2001-05-04 Thread Susan Richter
Can someone tell me what command I can use to go to machines and count the lines on a certain file? I have log files for every machines (20 all together). Each log file has lines that would equate to the files that it found. I need to know how many files are found on all the machines. I am