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=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18791 invoked from network); 7 Oct 2020 03:15:56 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 7 Oct 2020 03:15:56 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 8B57B9CF8D; Wed, 7 Oct 2020 13:15:51 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id A9BB09CF82; Wed, 7 Oct 2020 13:15:12 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=ccil-org.20150623.gappssmtp.com header.i=@ccil-org.20150623.gappssmtp.com header.b="RFlovLSj"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 12B889CF6D; Wed, 7 Oct 2020 13:15:10 +1000 (AEST) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) by minnie.tuhs.org (Postfix) with ESMTPS id 31F699CF59 for ; Wed, 7 Oct 2020 13:15:09 +1000 (AEST) Received: by mail-qk1-f176.google.com with SMTP id a23so973727qkg.13 for ; Tue, 06 Oct 2020 20:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ccil-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GXhIoYSpJdiJw4DYy85UGOet2CYVVaT443L+ujEEKhQ=; b=RFlovLSjKjjJCruqbo2JlkBgjJoJKzcXz1ohnHlWQOIDIH763SvvBJethjydnGXwBH BY4bl+3Pj6i6m+VMOMkqw00gMhRIRefTp4t30vmWFDLpf8H+VJhzpEIy6OVeNkT+ZIAI XvIdAhVXNcNuwzR2y6RMw7xSH4ybe1PGMUzvJySOqhD91EN1M1Lr5dXgdARh2E0bj0Ot F3VD01ZYgUzvGHZzxGcJB6AXW6DbN3Uvq5+G8jMYXPeHJ3cEh6YD3asZM1XdzVisvtV7 7bJSQ1v2JHwSgzmcp9CGABIEcRcIxpiEnGM3ophc5rw+eidsGarOBAp1IelEYe6ML/mh E5YQ== 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=GXhIoYSpJdiJw4DYy85UGOet2CYVVaT443L+ujEEKhQ=; b=kb73k3ONwpTcf1x0m5Eh1qggV3cHDR8jkPpUJAH4LozptrVNK7LZdEbR0PuwrWRs9/ Bx8gqtFsD2g6dwE0sSW8YQsvGh9naGz7xv3m3g1X93BbHy5TS+KI/Sl5cqxUgki4kXEA BaXo0yM1g5ewOJ2xJlZTzMrNpBOTC51rqFDiS7k3ayPm6OfFiyL7ULhvBefG6Dgmoy6e VJbeDg+l1yjMxVV/uc0DRI8/Tlyg2NRM7fFhMTajYUwDU5cYQxS53qev2BZxDoZFdwjP dBIZrTtGLuDhW/nTgGMil/75VvmSg4UelMEnlhSdEdiMXnNsDcHECiNO9A5lGzPf/4a4 g6Fg== X-Gm-Message-State: AOAM532BDdLAU/vJNrwGJCoIvbNNaxAnyHKDKWs5TS35UlhABtrg3lUr GkOz4dWeJ1dTdH00Y3uNDjWY3qCaxKPtXGZHa7aV4XFOQ0PE2hLd X-Google-Smtp-Source: ABdhPJxLSZmZtvQvw5gR/3pWPw5JdL+mwjfsXXaSczrshGVCTodyGRgCO2CALiYJDF51REvx0mC/sNcgPTJk7psl4M8= X-Received: by 2002:ae9:eb97:: with SMTP id b145mr939529qkg.60.1602040508211; Tue, 06 Oct 2020 20:15:08 -0700 (PDT) MIME-Version: 1.0 References: <20201006154420.2C93C18C099@mercury.lcs.mit.edu> In-Reply-To: From: John Cowan Date: Tue, 6 Oct 2020 23:14:57 -0400 Message-ID: To: George Michaelson Content-Type: multipart/alternative; boundary="0000000000006887b405b10c1f91" Subject: Re: [TUHS] Origins of globbing 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" --0000000000006887b405b10c1f91 Content-Type: text/plain; charset="UTF-8" Noel: Thanks for the heads-up on glob. It didn't occur to me to look in manual section 8. On Tue, Oct 6, 2020 at 7:11 PM George Michaelson wrote: globbing was the application of specific syntax markers to concepts, > Certainly. But I think the specific meanings of "*" to mean "any number of any characters" and "?" to mean "any character" do not go back further than 1964. Multics had support for * and ?, but I don't know when that was added or if it was there from the beginning. Multics filenames, unlike DEC ones, allow multiple dots, which are treated specially by these characters: neither ? nor * can match a dot, but ** can. So perhaps they got into Unix from Multics after all. Stratus VOS is another direct descendant of Multics, but I don't know if it has globs. Windows avoids quotation by blocking any of < > " : | ? * from appearing in pathnames (/ and \ mean the same thing to the kernel, but not to the shell or to the GUI file picker). In addition, non-disk device names cannot appear as part of a filename either before or after the dot: nul.c and c.nul, for example, are illegal because nul: is a device name, and you can use \dev\nul to reference the null device even though \dev does not exist. I think set noglob; ; set glob is often under-appreciated. I found the absence of set nullglob (which causes *.foo to expand to nothing if it matches no files) on Solaris 8 very irritating. It's still not part of Posix sh, though bash has it. I wrote some wrappers around cp and mv that looked for * and ? in the arguments (indicating no files) and removed those arguments; if no arguments were left after that, they exited with 0. Thus "safecp *.bak ../backup" would silently succeed if there were no .bak files. John Cowan http://vrici.lojban.org/~cowan cowan@ccil.org I come from under the hill, and under the hills and over the hills my paths led. And through the air. I am he that walks unseen. I am the clue-finder, the web-cutter, the stinging fly. I was chosen for the lucky number. --Bilbo --0000000000006887b405b10c1f91 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Noel: Thanks for the heads-up on glob.=C2=A0 It didn&= #39;t occur to me to look in manual section 8.

On Tue, Oct 6, 2020 at 7:11 P= M George Michaelson <ggm@algebras.org> wrote:

globbing= was the application of specific syntax markers to concepts,

Certainly.=C2=A0 But I think the specific meanings of= "*" to mean "any number of any characters" and "?= " to mean "any character" do not go back further than 1964.= =C2=A0

Multics had support for * and ?, but I don&= #39;t know when that was added or if it was there from the beginning.=C2=A0= Multics filenames, unlike DEC ones, allow multiple dots, which are treated= specially by these characters: neither ? nor * can match a dot, but ** can= .=C2=A0 So perhaps they got into Unix from Multics after all.=C2=A0 Stratus= VOS is another direct descendant of Multics, but I don't know if it ha= s globs.

Windows avoids quotation by blocking any = of=C2=A0< > " : | ? * from appearing in pathnames (/ and \ mean = the same thing to the kernel, but not to the shell or to the GUI file picke= r).=C2=A0 In addition, non-disk device names cannot appear as part of a fil= ename either before or after the dot: nul.c and c.nul, for example, are ill= egal because nul: is a device name, and you can use \dev\nul=C2=A0to refere= nce the null device even though \dev does not exist.

I think set noglob; <do = things>; set glob is often under-appreciated.

I found the absence of set nullglob (which causes *.foo to expand to = nothing if it matches no files) on Solaris 8 very irritating.=C2=A0 It'= s still not part of Posix sh, though bash has it.=C2=A0 I wrote some wrappe= rs around cp and mv that looked for * and ? in the arguments (indicating no= files) and removed those arguments; if no arguments were left after that, = they exited with 0.=C2=A0 Thus "safecp *.bak ../backup" would sil= ently succeed if there were no .bak files.

--0000000000006887b405b10c1f91--