[Wolves] The good samaritan

Adam Sweet drinky76 at yahoo.com
Wed Feb 18 09:10:24 GMT 2004


 --- Aquarius <aquarius-lists at kryogenix.org> wrote: >
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 :-)

No, thats cool. I take your point, it's like people
who confuse the words bought and brought (like my
sister and it irritates the f*ck out of my
intellectual snobbery.) Why do things anyhow when you
can do them properly. I didn't realise less would do
that for me. I thought I needed cat to display the
output and less to break it up for me. I'll play with
that and investigate its boundaries. It *is* pedantic,
but also more elegant.

Cheers ;)

> Aq.

Ad

=====
http://www.drinky.org.uk

======================================

Use Linux. Because it's better.


	
	
		
___________________________________________________________
BT Yahoo! Broadband - Free modem offer, sign up online today and save £80 http://btyahoo.yahoo.co.uk



More information about the Wolves mailing list