tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ using mknod

sh alias ▻

This Week's Useless Use of Cat Award goes to...

In article <389EEC8B.4644A10E@austin.ibm.com>,
Matthew Landt  <landt@austin.ibm.com> wrote:
>    wc -l < foo
>
>or
>
>    < foo wc -l
>
>As a side note, are the two commands above the same?

Yes, as is this version (not recommended!).

    wc < foo -l

>                                                      the former makes more
>sense to me, but I see the latter posted quite a bit.

In real life, I think most people put the redirection last, most of the
time.  It is often put first in UUOC threads, because it then looks more
like the `cat' version.  The hope is to shorten the cognitive distance
for compulsive users of `cat foo | ...'.  I suspect that it doesn't help
much, though.

Tim.
--
Tim Goodwin   | "If you don't know what closures are, you probably don't
Leicester, UK | want to know what closures are." -- Larry Wall

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: This Week's Useless Use of Cat Award goes to... (was Re: grep   -
 show n lines after find)
Date: 7 Feb 2000 16:21:55 -0000
Message-ID: <87mrfp$jft$1@ltpcg.star.le.ac.uk>
References: <86skss$66t@romeo.logica.co.uk>
  <9E4EFD792C60DFF8.E566DB39F08ABE0E.7C5CC05E6E7498AD@lp.airnews.net>
  <389d95ae.3220357@news.demon.co.uk> <389EEC8B.4644A10E@austin.ibm.com>

△ comp.unix.shell △

◅ using mknod

sh alias ▻