[H-GEN] ASCII Characters

Trent WADDINGTON s337240 at student.uq.edu.au
Sun Oct 26 22:32:33 EST 2003


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

On Mon, 27 Oct 2003, James McPherson - PTS Engineer wrote:

> Sure, but you missed the point. Tao was referring to a previous
> post which had
>
> cat file | strings

Which is the correct way.

> rather than just
>
> strings file

Which is an unnecessary feature of strings.

Ken Thompson told me so.  There's no need for strings to open any other
file than stdin and stdout.  It's a filter.

Reminds me of the old debate about tar containing gzip code (and now bzip
too!).  Why don't you just pipe the tar.gz through gzip before you pipe it
into tar?  Well, because most people who used tar never piped anything
into it in the first place, because tar had that completely unnecessary
feature of taking a file on the command line (which for the remainder of
this rant I will refer to as "the dark side").

The dark side led to tar becoming the bohemiath that it is today.  Of
course, tar always was big, and took filenames for other reasons,
namely creating the tar file.  Grep was the next to fall.  Why in the
world does grep take filenames?  Well, the dark side is seductive.  If
grep knows what files it is looking for patterns in it can print the name
of the file before matches.  This can be quite useful.  It's even possible
to grep -l, which does nothing but print the name of the file in which the
match is found.

Alas the dark side is so powerful now it has clouded the true use of cat.
Such a simple tool could never be of use they say.  The scripting
languages have taken over and the day of the pipe has ended.  Sweet cat,
we'll miss you.

Trent

--
* 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