RE: Counting number of lines in a text file

1999-02-04 Thread Jon Burchmore
> > I always wonder why people insist on doing > > cat file | otherprogram > > instead of just > > otherprogram < file > > To qualify for the most useless use of cat award of course. Or does Randall > Schwartz (sp) no longer hand those out? But given the original context, "wc -l

Re: Counting number of lines in a text file

1999-02-04 Thread J.H.M. Dassen
On Thu, Feb 04, 1999 at 21:11:59 +0100, Miquel van Smoorenburg wrote: > I always wonder why people insist on doing > cat file | otherprogram > instead of just > otherprogram < file To qualify for the most useless use of cat award of course. Or does Randall Schwartz (sp) no longer hand

Re: Counting number of lines in a text file

1999-02-04 Thread Peter S Galbraith
> I always wonder why people insist on doing > > cat file | otherprogram > > instead of just > > otherprogram < file Don't know... > Which is exactly the same, but saves processing time. Even DOS people > do this, while DOS doesn't even multitask .. cat file | otherprogram > is th

Re: Counting number of lines in a text file

1999-02-04 Thread servis
*- On 4 Feb, Miquel van Smoorenburg wrote about "Re: Counting number of lines in a text file" > In article <[EMAIL PROTECTED]>, > Diego Delgado Lages <[EMAIL PROTECTED]> wrote: >> >>cat file-name | wc -l > > I always wonder why people insi

Re: Counting number of lines in a text file

1999-02-04 Thread Miquel van Smoorenburg
In article <[EMAIL PROTECTED]>, Diego Delgado Lages <[EMAIL PROTECTED]> wrote: > >cat file-name | wc -l I always wonder why people insist on doing cat file | otherprogram instead of just otherprogram < file Which is exactly the same, but saves processing time. Even DOS people

Re: Counting number of lines in a text file

1999-02-03 Thread homega
Diego Delgado Lages dixit: > > cat file-name | wc -l just tried it and it works, but: $ wc -l file-name works as well -- Un saludo, Horacio [EMAIL PROTECTED] -- Quis custodiet ipsos custodet? --

Re: Counting number of lines in a text file

1999-02-03 Thread M.C. Vernon
> I was wondering what the quickest way to count the number of records > (lines) in a text file. It would be neat to do many files at once and save > the output in a seperate file in the format 'filename:::#records'. wc -l will do one file. Either write a shell script, or have a look at man wc

Re: Counting number of lines in a text file

1999-02-03 Thread Diego Delgado Lages
cat file-name | wc -l On Wed, 3 Feb 1999, Jay Barbee wrote: > Hey all, > > I was wondering what the quickest way to count the number of records > (lines) in a text file. It would be neat to do many files at once and save > the output in a seperate file in the format 'filename:::#records'. >

Re: Counting number of lines in a text file

1999-02-03 Thread Graham Ashton
On 3 Feb, Jay Barbee wrote: >>for a in file1 file2 file3; do \ >> echo -n $a >> seperate_file; \ >> echo -n ":::" >> seperate_file; \ >> wc -l $a >> seperate_file; \ >>done > > How would I gather a list of all TXT files in the directory before this and > pass each file to this script. replac

Re: Counting number of lines in a text file

1999-02-03 Thread Remco van de Meent
Jay Barbee wrote: > >> I was wondering what the quickest way to count the number of records > >> (lines) in a text file. It would be neat to do many files at once and > >> save the output in a seperate file in the format 'filename:::#records'. > > > >for a in file1 file2 file3; do \ > > echo -n $

Re: Counting number of lines in a text file

1999-02-03 Thread Jay Barbee
At 2/3/99 04:03 PM +0100, Remco van de Meent wrote: >Jay Barbee wrote: >> I was wondering what the quickest way to count the number of records >> (lines) in a text file. It would be neat to do many files at once and save >> the output in a seperate file in the format 'filename:::#records'. > >for

Re: Counting number of lines in a text file

1999-02-03 Thread Dale E. Martin
Jay Barbee <[EMAIL PROTECTED]> writes: > Hey all, > > I was wondering what the quickest way to count the number of records > (lines) in a text file. It would be neat to do many files at once and save > the output in a seperate file in the format 'filename:::#records'. wc -l Later, Dal

Re: Counting number of lines in a text file

1999-02-03 Thread Remco van de Meent
Jay Barbee wrote: > I was wondering what the quickest way to count the number of records > (lines) in a text file. It would be neat to do many files at once and save > the output in a seperate file in the format 'filename:::#records'. for a in file1 file2 file3; do \ echo -n $a >> seperate_file