
Useless Use of Cat Award (2000) - nishs
http://porkmail.org/era/unix/award.html
======
geon
> The purpose of cat is to concatenate (or "catenate") files. If it's only one
> file, concatenating it with nothing at all is a waste of time, and costs you
> a process.

>

>The fact that the same thread ("but but but, I think it's cleaner / nicer /
not that much of a waste / my privelege to waste processes!") springs up
virtually every time the Award is posted is also Ancient Usenet Tradition.

The time it saves me while writing and debugging that one off one liner is
well worth the tiny overhead.

If you think cat is useless when reading a file for piping, why do you spawn
multiple processes at all? Should'nt you write a custom tool that handles the
whole series of operations in one single process?

And why not write it in asm while you are at it? You should certainly never
use a garbage collector, right?

~~~
dozzie
> The time it saves me while writing and debugging that one off one liner is
> well worth the tiny overhead.

The award, as I remember, was not for using dead cat in a one-liner, it was
for _publishing_ this one-liner and _propagating_ use of this small stupidity.

Your work one-liners grow organically, so it's completely normal that they
accumulate cruft like `cut|sed|awk' pipeline, and there's little point to
clean them up if they are not going to leave your shell instance.

> If you think cat is useless when reading a file for piping, why do you spawn
> multiple processes at all?

Strawman argument. The Useless Use of Cat Award is for using `cat' where the
command fed with the file is perfectly fine with redirecting its input from
the file directly (i.e., most of the commands). This is _just as easy_ as
using `cat', but avoids unnecessary CPU spinning.

