[H-GEN] ASCII Characters

David Jericho davidj at pisoftware.com
Sun Oct 26 23:51:30 EST 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Paul Gearon wrote:

> Seems like a gratuitous use of "cat" to me.

Maybe redundant, but not gratuitous.

> What's wrong with:
> strings < file

In a blur of script, it's not intuitive. At least I find it not so.

cat input | strings > outputfile

I find easier to read than

strings < input > output

The reason I find it so is that I read left to right, my mind thinks in 
a particular order, the process happens in a particular order, and it's 
exceptionally clear beyond any doubt at a quick glance what the files 
input and output are.

> Why is is necessary to run a whole other process to get the shell to put 
> the contents of a file on stdin when the shell has this feature built in?

So you're proposing we optimise for least impact, instead of the easiest 
usage? Processor time, and memory are cheap. In the end it doesn't 
really matter as most tasks most people do are so small that there's no 
discernable performance increase.

There's also no reason why cat itself couldn't be built into the shell.

Plus, cat's are tasty. ;)

-- 
David Jericho
Systems Administrator, Plugged In Software


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list