[CLUE-Tech] Some CLI examples for new people

Kirk Rafferty kirk at fpcc.net
Thu Nov 6 09:46:45 MST 2003


On Thu, Nov 06, 2003 at 10:24:49AM -0600, Jay Seven Ess wrote:
> 
> 	$ cat myfile.txt | sort | uniq | wc -l

Useless use of cat. (IBM's fault, not Jay's :)  Should be:

        $ sort myfile.txt | uniq | wc -l

And actually, with modern versions of sort I think you could get away
with just:

        $ sort -u myfile.txt | wc -l

(I'm sorry, I know in this day of gigahertz processors and cheap RAM,
that I shouldn't be so pedantic.  But I am.)

-k



More information about the clue-tech mailing list