From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9175 invoked from network); 4 Dec 2020 13:15:59 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 4 Dec 2020 13:15:59 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 4F3659CA8B; Fri, 4 Dec 2020 23:15:52 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 0022F9CA51; Fri, 4 Dec 2020 23:15:15 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="p9766tLl"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id D389B9CA4F; Fri, 4 Dec 2020 23:15:11 +1000 (AEST) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by minnie.tuhs.org (Postfix) with ESMTPS id D8FBD9CA4B for ; Fri, 4 Dec 2020 23:15:05 +1000 (AEST) Received: by mail-lj1-f179.google.com with SMTP id 142so6530226ljj.10 for ; Fri, 04 Dec 2020 05:15:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bFp/CnO6e3HMFJwnztMPujT0G0hLsgbgp2eWDT1jD/c=; b=p9766tLlTnknvDV6HaYN+zZVgiS4azvytFNd5Tb2L6PwP89HkA272vyFo85g/wHEbe 8OIpfgHWOw1qUxkKhB4zO6HYuwZZNCcar7YEKCZ/09QqI9crf7EL8jB8p7+HprqxFYuJ lUr5EPtgJdQ12vpw9HFfXqRyhOpp32ed5Kxm6AaXJU9DiSMFt+p4P+KhSrkfDpQMmtON XhZ/qsa8Dx2p/fLS/6ZO6hTSrUAg2kff6h1VPeaz4SDxN9h/z5SP1u7kanA0+16l4z9w QvQlrkvF6L2xxkWE0g+JpoH2gtX2OzC0nKgo9fAl6WimOXqvQMCFfmB6yu60o5/IB/eQ sgGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bFp/CnO6e3HMFJwnztMPujT0G0hLsgbgp2eWDT1jD/c=; b=H6jKDrtubjBkZaGYot3XjSyRzrl5NMj1CMTrgo7XXEfDdCmjRuXAOrtsY75a472nB+ /IxVQZtTOtQU4ofvjYoGWQG7y+KRnCivr2zz/vXtN4Xzf15ZEG0EFdmeLu5RNU79mf9I WkWWfguXP25Cdb3kkrQvXAS4PPZXZcbAC7RTt9yNRiG68QosSwzCESJvBKGmvs0reAGu YjIRldAKOW6k65U29L/IlcLwbnXdMwauqNk/3UryLcWLrHOhHyn9hF1XU7xS0m0odxGz mltgsdRKs0HMFOv9U+mnBW8FikW6oUq8pQ2dvX6I8zxClM43oydWtxTAG0xYVjJFcQ+d UsVA== X-Gm-Message-State: AOAM530KRTkPNWoo433QSaOTmPlW8MgedYfXOD3RtVjR1gWSn2+E+0PK bhmj8T0qjKRFHyNlrcickviK2R4UtSFfMmlYww== X-Google-Smtp-Source: ABdhPJzglvAqkdFTzlr3cIB9BdeClV8/UNXtASAFbbpVUILtKM9KprG0/C7RqcuKJVfOL5Ibq498wYCbRddAabD3YyA= X-Received: by 2002:a2e:99cb:: with SMTP id l11mr3379938ljj.249.1607087704043; Fri, 04 Dec 2020 05:15:04 -0800 (PST) MIME-Version: 1.0 References: <20201203204301.GW19746@mcvoy.com> <202012040927.0B49Rkx6019895@freefriends.org> In-Reply-To: From: Tyler Adams Date: Fri, 4 Dec 2020 15:14:52 +0200 Message-ID: To: Andy Kosela Content-Type: multipart/alternative; boundary="000000000000b8f6ab05b5a3430e" Subject: Re: [TUHS] The UNIX Command Language (1976) X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: The Eunuchs Hysterical Society Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --000000000000b8f6ab05b5a3430e Content-Type: text/plain; charset="UTF-8" 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 wrote: > On 12/4/20, arnold@skeeve.com wrote: > > Dan Cross 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 > --000000000000b8f6ab05b5a3430e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I find cat file | grep foo simpler because it reads L= eft to Right.

=C2=A0Tyler


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 <cr= ossd@gmail.com> wrote:
>
>> This has always struck me as particularly elegant in scripts. Cons= ider:
>>
>>=C2=A0 =C2=A0 =C2=A0cat "$@" | whatever
>>
>> (Or you may prefer `cat $* | whatever`)
>>
>> Now one's script can take any number of file arguments or stdi= n, even if
>> the filter does not.
>
> I think Dan has hit the heart of the matter. People are used to using<= br> > cat for multiple files to start pumping data down a pipeline, so they<= br> > continue to do so even when there's only one file.
>

The classic example is:

=C2=A0 $ cat file | grep foo

instead of the simpler:

=C2=A0 $ grep foo file

It appears cat(1) and pipe(7) are deeply ingrained in people's brains.<= br>
--Andy
--000000000000b8f6ab05b5a3430e--