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.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY 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 849941fd for ; Sun, 5 Jan 2020 00:11:38 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id 96CDE951B5; Sun, 5 Jan 2020 10:11:37 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id AC2909516C; Sun, 5 Jan 2020 10:11:13 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id C9A639516C; Sun, 5 Jan 2020 10:11:10 +1000 (AEST) X-Greylist: delayed 399 seconds by postgrey-1.36 at minnie.tuhs.org; Sun, 05 Jan 2020 10:11:09 AEST Received: from hekla.abc.se (hekla.abc.se [158.174.61.227]) by minnie.tuhs.org (Postfix) with ESMTPS id B3CFE95165 for ; Sun, 5 Jan 2020 10:11:09 +1000 (AEST) Received: from eeyore.prefix.duckdns.org (83-233-144-121.cust.bredband2.com [83.233.144.121]) by hekla.abc.se (OpenSMTPD) with ESMTPSA id 609854ce (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Sun, 5 Jan 2020 01:04:28 +0100 (CET) Received: from pooh.prefix.duckdns.org (pooh.prefix.duckdns.org [192.168.1.20]) by eeyore.prefix.duckdns.org (OpenSMTPD) with ESMTP id 97824c0b; Sun, 5 Jan 2020 01:04:27 +0100 (CET) Received: from localhost (pooh.prefix.duckdns.org [local]) by pooh.prefix.duckdns.org (OpenSMTPD) with ESMTPA id e8ce5ebe; Sun, 5 Jan 2020 01:04:27 +0100 (CET) Date: Sun, 5 Jan 2020 01:04:27 +0100 From: Andreas Kusalananda =?iso-8859-1?B?S+Ro5HJp?= To: Dave Horsfall Message-ID: <20200105000427.GA67963@pooh.prefix.duckdns.org> Mail-Followup-To: Dave Horsfall , The Eunuchs Hysterical Society References: <202001040258.0042wuic1359237@mail.cs.dartmouth.edu> <1ingL0-5g6-00@marmaro.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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: , Cc: The Eunuchs Hysterical Society Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Sun, Jan 05, 2020 at 10:53:47AM +1100, Dave Horsfall wrote: > On Sat, 4 Jan 2020, Chet Ramey wrote: > > > It's elegant until you forget that `:' continues to process redirections. > > So just keep remembering that it's an actual command :-) > > Which reminds me: which Shell introduced "#" as a true comment? > > Hmmm, not quite true; only the C-Shell says "#: Command not found" so it > only works in a script; odd... > > Then again, no-one in their right mind uses "csh" :-) > > -- Dave In bash (turning off interactive_comments): $ shopt -u interactive_comments $ echo hello # world hello # world $ # oh bash: #: command not found In zsh (by default): $ echo hello # world hello # world $ # oh zsh: command not found: # zsh is the fun one though (allows setting the comment character): $ histchars[3]='@' $ echo hello @ world hello @ world $ setopt INTERACTIVE_COMMENTS $ echo hello @ world hello $ @ oh, a comment $ -- Andreas (Kusalananda) Kähäri SciLifeLab, NBIS, ICM Uppsala University, Sweden