The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Tyler Adams <coppero1237@gmail.com>
To: Andy Kosela <akosela@andykosela.com>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: Re: [TUHS] The UNIX Command Language (1976)
Date: Fri, 4 Dec 2020 15:14:52 +0200	[thread overview]
Message-ID: <CAEuQd1A3VKfuqr8vL8e7mxWVpKC8yzNAgzBd3vAD=KhaED5dzA@mail.gmail.com> (raw)
In-Reply-To: <CALMnNGg1Cfjm+dOxqmvn3+oKto7wkMVLHE1o8vEfv+iMQkV6mw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 931 bytes --]

I find cat file | grep foo simpler because it reads Left to Right.

 Tyler


On Fri, Dec 4, 2020 at 1:34 PM Andy Kosela <akosela@andykosela.com> wrote:

> On 12/4/20, arnold@skeeve.com <arnold@skeeve.com> wrote:
> > Dan Cross <crossd@gmail.com> wrote:
> >
> >> This has always struck me as particularly elegant in scripts. Consider:
> >>
> >>     cat "$@" | whatever
> >>
> >> (Or you may prefer `cat $* | whatever`)
> >>
> >> Now one's script can take any number of file arguments or stdin, even if
> >> the filter does not.
> >
> > I think Dan has hit the heart of the matter. People are used to using
> > cat for multiple files to start pumping data down a pipeline, so they
> > continue to do so even when there's only one file.
> >
>
> The classic example is:
>
>   $ cat file | grep foo
>
> instead of the simpler:
>
>   $ grep foo file
>
> It appears cat(1) and pipe(7) are deeply ingrained in people's brains.
>
> --Andy
>

[-- Attachment #2: Type: text/html, Size: 1693 bytes --]

  reply	other threads:[~2020-12-04 13:15 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKH6PiWA2uN4m0AGp7VRJTQ6XXDLJQweHoHjx2wN=zQYs1onpA@mail.gmail.com>
2020-12-03 20:31 ` M Douglas McIlroy
2020-12-03 20:37   ` Niklas Karlsson
2020-12-03 20:43     ` Larry McVoy
2020-12-03 20:56       ` Ralph Corderoy
2020-12-03 21:01       ` Ben Walton
2020-12-03 21:12       ` Clem Cole
2020-12-04  0:29       ` Dave Horsfall
2020-12-04  0:43         ` Rob Pike
2020-12-04  0:48           ` Larry McVoy
2020-12-04  1:25           ` Dan Cross
2020-12-04  9:27             ` arnold
2020-12-04 11:33               ` Andy Kosela
2020-12-04 13:14                 ` Tyler Adams [this message]
2020-12-04 13:17                   ` Niklas Karlsson
2020-12-04 13:22                     ` Tyler Adams
2020-12-04 13:25                       ` Niklas Karlsson
2020-12-04  0:45         ` George Michaelson
2020-12-04  1:10         ` Bakul Shah
2020-12-04  1:17           ` George Michaelson
2020-12-03 20:51     ` M Douglas McIlroy
2020-12-01  3:13 Norman Wilson
2020-12-02  0:31 ` George Michaelson
2020-12-02  1:06   ` Adam Thornton
2020-12-02 17:02     ` John Cowan
     [not found] <CAMP=X_mO9oawUpHGOvgVtwVTgcmvdXAc5vrE_+s3d2NsH+1HgA@mail.gmail.com>
2020-12-01  0:00 ` Joachim via TUHS
2020-12-01  0:21   ` Dave Horsfall
2020-12-01  2:23     ` Larry McVoy
  -- strict thread matches above, loose matches on Subject: below --
2020-11-30  3:10 Joachim via TUHS
2020-11-30  8:30 ` Thomas Paulsen
2020-11-30 13:36 ` Brantley Coile
2020-11-30 15:12   ` Tom Ivar Helbekkmo via TUHS
2020-11-30 15:52 ` Clem Cole
2020-11-30 16:25   ` Dan Cross
2020-11-30 16:38     ` Warner Losh
2020-11-30 16:41       ` Dan Cross
2020-11-30 16:37   ` Larry McVoy
2020-11-30 16:54     ` Clem Cole
2020-11-30 18:13       ` Theodore Y. Ts'o
2020-11-30 18:25       ` John Cowan
2020-11-30 18:37         ` Clem Cole
2020-11-30 20:11           ` arnold
2020-11-30 21:49             ` Will Senn
2020-12-01  2:55             ` Jon Steinhart
2020-11-30 18:46         ` Nemo Nusquam
2020-12-01  3:59 ` jason-tuhs
2020-12-01  4:03   ` Jon Steinhart
2020-12-01  9:27   ` Steve Nickolas
2020-12-01 15:09   ` Jim Capp
2020-12-01 15:35     ` Toby Thain
2020-12-01 15:38     ` arnold
2020-12-01 16:24       ` Warner Losh
2020-12-01 16:39         ` arnold
2020-12-01 20:13           ` Rob Pike
2020-12-02  7:08             ` arnold
2020-12-02  7:29               ` Rob Pike
2020-12-01 20:20           ` Steffen Nurpmeso
2020-12-01 20:39             ` Bakul Shah
2020-12-01 21:24               ` Dan Cross
2020-12-01 23:44                 ` John Cowan
2020-12-12 19:50           ` scj
2020-12-01 16:47         ` Larry McVoy
2020-12-01 20:13     ` Dave Horsfall
2020-12-01 20:49       ` John Cowan
2020-12-01 16:04 ` Tyler Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEuQd1A3VKfuqr8vL8e7mxWVpKC8yzNAgzBd3vAD=KhaED5dzA@mail.gmail.com' \
    --to=coppero1237@gmail.com \
    --cc=akosela@andykosela.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).