From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 09a3f521 for ; Sat, 4 Jan 2020 22:45:05 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id CA42A951BB; Sun, 5 Jan 2020 08:45:03 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 76C9E95189; Sun, 5 Jan 2020 08:44:40 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 44AA995170; Sun, 5 Jan 2020 08:44:37 +1000 (AEST) Received: from marmaro.de (marmaro.de [176.28.23.198]) by minnie.tuhs.org (Postfix) with ESMTP id 729A99516C for ; Sun, 5 Jan 2020 08:44:36 +1000 (AEST) Received: by marmaro.de (masqmail 0.3.6-dev, from userid 1000) id 1ins9r-4KA-00 for ; Sat, 04 Jan 2020 23:44:35 +0100 To: tuhs@minnie.tuhs.org In-reply-to: References: <202001040258.0042wuic1359237@mail.cs.dartmouth.edu> <1ingL0-5g6-00@marmaro.de> Comments: In-reply-to Terry Jones message dated "Sat, 04 Jan 2020 23:19:07 +0100." MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16625.1578177875.1@marmaro.de> Date: Sat, 04 Jan 2020 23:44:35 +0100 From: markus schnalke Message-ID: <1ins9r-4KA-00@marmaro.de> Subject: Re: [TUHS] sh: cmd | >file 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: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Hoi. [2020-01-04 23:19] Terry Jones > > Was : actually designed for commenting? Hardly, because who would want comments to have side effects: : don't do this Or this: : ignored; echo executed Or this dangerously ``outcommented'' line: : test ... && rm file ! Using : for comments is only possible as the command does nothing and ignores its arguments ... but the shell parses the arguments as for every other command ... and executes stuff in the line that are no arguments to :. In case of #, the rest of the line is truly ignored, as comments should be like. > but : is much nicer because you can "comment" out a > single command in (e.g.) an if/then and it remains syntactically valid and > executable. I find it very elegant. Can you please give an example for me to understand what you mean by that? meillo