On Mon, Jul 25, 2005 at 11:55:52AM +0100, Timothy Murphy wrote:
> On Mon 25 Jul 2005 11:37, Proinnsias Breathnach wrote:
> > > I think "ls | cat"
> >
> > And today's "Useless Use of cat Award" goes to ...
>> Why so?
> I could have said "redirecting or piping the output" but that seemed simpler.
Mainly because, while that is the default behaviour of ls (single col on
pipe/redirect) it can be overridden. That and there's usually a way of
redirecting without using cat :)
>> I don't think normal people ever say "ls -1".
> It shows excessive devotion to man pages.
Quite possibly not :) ... indeed normal people don't use Unix/Linux
anyway !!
ls -1 is a much nicer way of doing it in scripts for example -
especially better than `ls | cat` because it makes the script easier for
'future generations' to read. In maths, problems are usually (aiui)
'boiled down' to the simplest expression (4/8 -> 1/2 etc). Likewise in
computing / scripting, it's sensible (if not strictly necessary any
more) to conserve resources / processes.
Oh ... that and no-one had got the UUocA for a while !
P
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!