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 9551 invoked from network); 4 Dec 2020 13:18:27 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 4 Dec 2020 13:18:27 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id A75D19CA9E; Fri, 4 Dec 2020 23:18:22 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 7DAD69CA4F; Fri, 4 Dec 2020 23:17:58 +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="HKy1Mpc+"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 4453D9CA4F; Fri, 4 Dec 2020 23:17:57 +1000 (AEST) Received: from mail-vk1-f170.google.com (mail-vk1-f170.google.com [209.85.221.170]) by minnie.tuhs.org (Postfix) with ESMTPS id 50E089CA4B for ; Fri, 4 Dec 2020 23:17:56 +1000 (AEST) Received: by mail-vk1-f170.google.com with SMTP id f71so436023vka.12 for ; Fri, 04 Dec 2020 05:17:56 -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=d73mul2tG/2OkewIa2af1+iV39KfsRIZ0dntxwlYZeo=; b=HKy1Mpc+j49nCKf9gDS882Ch9cX9HPzF5qRRoEI0vRW3l7UwtnYarmpCQae2dKtpah HDwPDcafn6NjYAvdLprQtGDw9eg2ibSsjOtnyyxHws50EeEPX+lrvGItrc58qBl+vDsA yX/7Zn7eTo4MPN5H9JzWabJGDbVqhsCx9YgQYGNqKQsbSxJFFmWgIbRgbXx0G1XITadB fwimUCYkJO9V0eYKJs2Rf+cgqqLvFyi/epAbOp9uZ3J5TBYIbIZktYKl2Wot+UjEW3UL vkDqWATu4XP88zYqOKMnZ2ssq9uR80MdOEGaec95kVTQHOxLFv2p3RxnnD2BwLb122JD J8BQ== 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=d73mul2tG/2OkewIa2af1+iV39KfsRIZ0dntxwlYZeo=; b=IHH29exSMbOvU8esu2JTObR6g5iX4uDGBovaj8vU6bWX0NOEJHwoMEvzRuC2pb0Pim 5cqmtSc8W6NnpnYeQUwLjTd6TnO91iev5+LHQziG7eBQoeDcurGucDskcJOXjg3nmreg WuDh/DilW2X0pFskgOKpfoYD8ERepYfKN1EN4ehpJMqppAxD3Tv6xzCFWyAMZGUapcku RWuAiyF/117T6ib8Q5f9mV9OXqTimKTKWjA9s/6R9SjCW9B+8y/Szm/9ZmG4oP2whMm9 xLTdPBllx/CBa3gDLx0Ii7hQ6XRMc52Y+0/rka5MRKmXkGcxvu5SSgjibIl/aM84wKNq xSbw== X-Gm-Message-State: AOAM533gVqYKV1BQd+/nH6ROQo3CWdDOdlrgjo+uhCw/U58Fekt5NGDN LpK7E8S+OTZ0Mi9tIyto8jkpbqDM3XSATT3Yw6o= X-Google-Smtp-Source: ABdhPJzw0q1l7uC9eDSEVN50Zmjew7THH/zcxiN0XifDpk2vjc3byZvuUSCNd3DMoBsj2xDxD1FU11wnA+O87pxB8Tk= X-Received: by 2002:a1f:e704:: with SMTP id e4mr3272852vkh.1.1607087874392; Fri, 04 Dec 2020 05:17:54 -0800 (PST) MIME-Version: 1.0 References: <20201203204301.GW19746@mcvoy.com> <202012040927.0B49Rkx6019895@freefriends.org> In-Reply-To: From: Niklas Karlsson Date: Fri, 4 Dec 2020 14:17:43 +0100 Message-ID: To: Tyler Adams Content-Type: multipart/alternative; boundary="000000000000e053d205b5a34d7a" 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" --000000000000e053d205b5a34d7a Content-Type: text/plain; charset="UTF-8" < file grep foo works. Niklas Den fre 4 dec. 2020 kl 14:16 skrev Tyler Adams : > 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 >> > --000000000000e053d205b5a34d7a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
< file grep foo works.

Ni= klas

Den fre 4 dec. 2020 kl 14:16 skrev Tyler Adams <coppero1237@gmail.com>:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
I fi= nd cat file | grep foo simpler because it reads Left to Right.
=C2=A0Tyler

<= br>
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> wrot= e:
> 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
--000000000000e053d205b5a34d7a--