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=-1.0 required=5.0 tests=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 3e4acb39 for ; Sun, 5 Jan 2020 13:54:49 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id 743A0951B5; Sun, 5 Jan 2020 23:54:47 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id C64609516C; Sun, 5 Jan 2020 23:54:12 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id E73BA9516C; Sun, 5 Jan 2020 23:54:09 +1000 (AEST) X-Greylist: delayed 524 seconds by postgrey-1.36 at minnie.tuhs.org; Sun, 05 Jan 2020 23:54:09 AEST Received: from pmg.in-ulm.de (pmg.in-ulm.de [217.10.8.27]) by minnie.tuhs.org (Postfix) with ESMTPS id 2008C95165 for ; Sun, 5 Jan 2020 23:54:09 +1000 (AEST) Received: from pmg.in-ulm.de (localhost.localdomain [127.0.0.1]) by pmg.in-ulm.de (Proxmox) with ESMTP id DD7F925F86 for ; Sun, 5 Jan 2020 14:45:23 +0100 (CET) Received: from mail.in-ulm.de (unknown [217.10.8.10]) by pmg.in-ulm.de (Proxmox) with SMTP id BD29220A6D for ; Sun, 5 Jan 2020 14:45:23 +0100 (CET) Received: (qmail 420095 invoked by uid 11025); 5 Jan 2020 13:45:23 -0000 Date: Sun, 5 Jan 2020 14:45:23 +0100 To: The Eunuchs Hysterical Society Message-ID: <20200105134523.GA417916@lisa.in-ulm.de> References: <202001040258.0042wuic1359237@mail.cs.dartmouth.edu> <1ingL0-5g6-00@marmaro.de> <854eca1c-e5e5-5d8b-f5af-30cd1735096e@case.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <854eca1c-e5e5-5d8b-f5af-30cd1735096e@case.edu> X-URL: http://www.in-ulm.de/~mascheck/ Organization: united xpiloteers User-Agent: Mutt/1.5.20 (2009-06-14) 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: , From: Sven Mascheck via TUHS Reply-To: mascheck@in-ulm.de Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Sat, Jan 04, 2020 at 09:41:59PM -0500, Chet Ramey wrote: > On 1/4/20 6:53 PM, Dave Horsfall wrote: > > Which reminds me: which Shell introduced "#" as a true comment? > > Define "true comment." The v7 shell had `#' as the comment character, but > it only worked when in non-interactive shells. I think it was the Sys III > shell that made it work when the shell was interactive. > > This is, incidentally, why bash has the `interactive_comments' option, > which I saw in another message. BSD, which most of the GNU developers were > using at the (pre-POSIX) time, used the v7 shell and didn't have > interactive comments. When a sufficiently-advanced POSIX draft required > them, we added it. concerning "interactive" I think instead of the V7 sh you rather have the BSD sh in mind here. V7 sh didn't know # at all. At ATT it came with SysIII (both modes). And keep in mind, stty erase defaulted to # on V7, even until SySV (and 3BSD), and this character wouldn't have been handy anyway. 4+BSD changed this. 4.1BSD implemented #, and 4.3 BSD changed it to "non-interactive only". (And all this is not to be confused with the # hack to exec to csh on 3+BSD, only if it's the first character in a script.) BTW, an academic yet funny example of : side effects is this : `echo output 1>&2` Sven