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=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,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 2cdb3c78 for ; Tue, 7 Jan 2020 00:40:27 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id B4DEE9BB66; Tue, 7 Jan 2020 10:40:25 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id E317F9BB69; Tue, 7 Jan 2020 10:39:54 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=bsdimp-com.20150623.gappssmtp.com header.i=@bsdimp-com.20150623.gappssmtp.com header.b="POlAYoES"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 6AE4D9BB4A; Tue, 7 Jan 2020 10:39:52 +1000 (AEST) Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by minnie.tuhs.org (Postfix) with ESMTPS id 46F5C9BB4A for ; Tue, 7 Jan 2020 10:39:51 +1000 (AEST) Received: by mail-qk1-f170.google.com with SMTP id w127so41195539qkb.11 for ; Mon, 06 Jan 2020 16:39:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wHYkHYKE7DVtuwLw0BXHM0Yfr/9I6c21e+oQnoYke98=; b=POlAYoESWRboiKlX4aVMa6HlaOH4HOe7WVPnPuwcfcMBolYuZYqz939IE763x9Dx23 +tm98zQKD2nQERB9fhORK70NDEMT//hOUibdx19g0wuJ9QzX8e+3OnOeNIBHHzLUihSa bCdvkUsGfuYBQN+ObAzzki6SPmDjBwESwixySCBzDocWvqAMch9N+jBWb0/etibtpnxT kbGG6nScGQYncOJBRNrWTish5emQj1MrGqLwRz/U8DLsXBHPTcle8eRuBfiDV99nxGpN aJFV54Np7UZwj4wflZZ8oeElE/BI0fcpqn901Wpj6RZi9vT7ddcChMP0VNTvXWx5z7rt t7EA== 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=wHYkHYKE7DVtuwLw0BXHM0Yfr/9I6c21e+oQnoYke98=; b=ioepSQ++hNBywGD1AgwhY51qf/JFY5MkX+uT+EiTKDJuHjOVZPQUeegTruB2eGM/Ou bwzF55VMrf59iDLmt6+dth3vTcYiY0QalMh81x/m4ZrXweUdXf/kNQTMm/mvf/8JzKE8 i6jMlp51brgF0JWDAw9RCyiJQy5a2spe00WKDc3NcGkYcgyixNVWAmNSRN/14AifRq9d UDmoV1esGaHHo+EYnAMn/wMMvUwVxt5lRdbaHNm/27fDF5L/ioq0CekuL7v++Cy22ELL TJgWuZ0mBaiTA9mmVPgig7zLJEd6PrcETzFX246hCBtTlPWPDO7btX6K+utFLCuNOtca vd9w== X-Gm-Message-State: APjAAAW0nk2EGXfShWFnlRFfN2R/4k0k5LN/7SgRNSsa3osKiSU9DNgq 1Ge9wUs6U+ZvhIAfQrlazw4rIhi0dd2FJ/O4wNtmBw== X-Google-Smtp-Source: APXvYqwid25edqz0b3UUexynkMIl3LBzbCtDYjrNr8DKklIK1A14gr/oayNKK4bjX0Zyy10Pc0V4wd65aJtr97FVYQo= X-Received: by 2002:a37:52d5:: with SMTP id g204mr87776568qkb.215.1578357590282; Mon, 06 Jan 2020 16:39:50 -0800 (PST) MIME-Version: 1.0 References: <202001060630.0066U7U7023760@cuzuco.com> In-Reply-To: From: Warner Losh Date: Mon, 6 Jan 2020 17:39:39 -0700 Message-ID: To: Dave Horsfall Content-Type: multipart/alternative; boundary="0000000000007f64ad059b820304" Subject: Re: [TUHS] # (was Re: 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" --0000000000007f64ad059b820304 Content-Type: text/plain; charset="UTF-8" On Mon, Jan 6, 2020 at 3:51 PM Dave Horsfall wrote: > On Mon, 6 Jan 2020, Brian Walden wrote: > > > csh(1) was wrtten around 1978 and yes # as a comment was only for > > scrtipts, think it was why would you need to comment interactively? > > Why would you *not* want to? You've just made "#" asymmetric in its > behaviour; in the meantime the parser just sees an unescaped "#" and > ignores everything after that, without regard to context. > > You might also be using "script" e.g. > > script > blah blah > # Now here I do something funky > *really* funky stuff > ^D > Or you might have cut and paste the commands from a script to test something, or to redo something by hand that failed for some reason. Warner > [...] > > > Also before you say wait! ALGOL uses # as comment and is older than > > Kernighan' ratfor(1). [...] > > Funny; I recall ALGOL using "comment ... ;" or was that ALGOLW (which I > loved using; I wish I still had my ALGOLW book)? > > -- Dave > --0000000000007f64ad059b820304 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jan 6, 2020 at 3:51 PM Dave H= orsfall <dave@horsfall.org> = wrote:
On Mon, 6= Jan 2020, Brian Walden wrote:

> csh(1) was wrtten around 1978 and yes # as a comment was only for
> scrtipts, think it was why would you need to comment interactively?
Why would you *not* want to?=C2=A0 You've just made "#" asymm= etric in its
behaviour; in the meantime the parser just sees an unescaped "#" = and
ignores everything after that, without regard to context.

You might also be using "script" e.g.

=C2=A0 =C2=A0 =C2=A0script
=C2=A0 =C2=A0 =C2=A0blah blah
=C2=A0 =C2=A0 =C2=A0# Now here I do something funky
=C2=A0 =C2=A0 =C2=A0*really* funky stuff
=C2=A0 =C2=A0 =C2=A0^D

Or you might hav= e cut and paste the commands from a script to test something, or to redo so= mething by hand that failed for some reason.

Warne= r
=C2=A0
[...]

> Also before you say wait! ALGOL uses # as comment and is older than > Kernighan' ratfor(1). [...]

Funny; I recall ALGOL using "comment ... ;" or was that ALGOLW (w= hich I
loved using; I wish I still had my ALGOLW book)?

-- Dave
--0000000000007f64ad059b820304--