[Wolves] The good samaritan

Aquarius aquarius-lists at kryogenix.org
Tue Feb 17 23:27:48 GMT 2004


Adam Sweet spoo'd forth:
> cat /var/log/messages | less

Now, firstly, I have to say that Adam's advice is all great. So
right now I'm going to get on a pedantic hobby horse that has
nothing to do with his excellent advice in order to rant. Feel
free to ignore this.

The rant is: do not use cat when you don't need to.

Don't do "cat foo | less". Do "less foo".
Don't cat things into a filter; redirect them. (foofilter < foo,
not cat foo | foofilter.) You're just creating an extra process
for no reason. Now, I know that this doesn't really matter that
much, any more than pluralising "potato" as "potato's" matters,
but I'm still ranting about it anyway because I spent nearly
seven hours in a meeting today and I'm taking it out on you :-)

Aq.

-- 
Java sucks. [...] Java on TV set top boxes will suck so hard it
might well inhale people from off  their sofa until their heads
get wedged in the card slots.         --- Jon Rabone, ucam.chat



More information about the Wolves mailing list