Counting characters with unix utilities

Mike My Watch Has Windows Meyer mwm at raven.pa.dec.com
Tue Sep 25 04:38:55 AEST 1990


   ed must have been kidding when he left the cat in place, instead of

   tr -cd 'A' < file | wc -c

Why? Some people prefer the form

	cat file | utility args

to

	utility args < file

Why change from one to the other, except for efficiency? And even
then, there isn't enough difference to bother with for a command line.
For a script, you'd want to use the latter, though. But then the
difference is hidden from the user.

	<mike

--
Il brilgue: les toves lubricilleux			Mike Meyer
Se gyrent en vrillant dans le guave,			mwm at relay.pa.dec.com
Enmimes sont les gougebosqueux,				decwrl!mwm
Et le momerade horsgrave.



More information about the Comp.unix.questions mailing list