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 4352 invoked from network); 6 Oct 2020 15:19:48 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 6 Oct 2020 15:19:48 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 11E549CEE6; Wed, 7 Oct 2020 01:19:47 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 1CA659CEC4; Wed, 7 Oct 2020 01:18:23 +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="whkgRf+4"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id ECFA29CE97; Wed, 7 Oct 2020 01:18:20 +1000 (AEST) Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) by minnie.tuhs.org (Postfix) with ESMTPS id DBAA79CE93 for ; Wed, 7 Oct 2020 01:18:19 +1000 (AEST) Received: by mail-qv1-f46.google.com with SMTP id j3so8147547qvi.7 for ; Tue, 06 Oct 2020 08:18:19 -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=dNFZ2C27zSOPBbvFiCyM/J9eXUfhhqf3T1bUxvU6rog=; b=whkgRf+40uce0WCa/xlTevqJgC76GIqJB7GNCV/BbuqdFjgfd2RLnJY2vZ4A/Ahh+i 7mF20RlPRjStIUGfOcTDOu8apfKMgAd/9g2yX4vl1zVRHVsmy83qoPqIj5nFXPc3znLZ bTlyvFDKpu4ealUx57R8AvxDSC4I/g6oORB673PPEBB4WOeXNOh4E2QoUlm1ELaI2yjJ ps16iAvRMDEafAEfg4Jp/hxLrOr8UbzII7sw4B+W+Xdw/95GAKux+dZgjjQaA5pNeAkT kFxMe11rCA/dhird/nWBzb+jNNlUgtVOZa8rWZD58JOMSsemL32QXK2tXGlWSqFyxHvb N1MQ== 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=dNFZ2C27zSOPBbvFiCyM/J9eXUfhhqf3T1bUxvU6rog=; b=bTs3xBMWB706ckCNYdw39+f/WiOZHAtICih+pvg/lYWSqgCEENJEtv4SMR8P3lwa2/ hu+ChddjGZr/o7/7I3Or/EW4Dn587HXBqRvmg9+hvgMx7g18ULeCWoaF7YzN0zKYc79E A0CMC7GEGjcVAzrRM85nOGDbpp0FWVptuG5/M3D6HxPw+1SOR5tuwPfrOmYt40x9s3se 8ITeW1DkTemUCvT01m10QSpYw7jtTldg8CWzkNdqfVv8EFsYx8MAhQAbFFITvO6q5m2X kFLgdA4njdlCLdT3Ye7w6d3LRIJwio0hpER8gAN5brWD2fE9Byr1I8UryIjn/1dSXRRS SFDQ== X-Gm-Message-State: AOAM533JYIA4s9TPGio7p98k+vZqNbBigXy4Efhl2TrHpIBX+gbx2t+8 Bwtg7uAsGlZg8xQw9fSkk0XF3Y4jk5TGIH2dOstIug== X-Google-Smtp-Source: ABdhPJwK4y96OIXqYSyXJmAl4hdhfVS0d4sgDw2h8gmK02IT1cBgV7i7z66gMcHXKUFQ+8eFbMz5cDgAtC8uNxwBmhk= X-Received: by 2002:a0c:e892:: with SMTP id b18mr5099002qvo.4.1601997498874; Tue, 06 Oct 2020 08:18:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: John Cowan Date: Tue, 6 Oct 2020 11:17:58 -0400 Message-ID: To: Tyler Adams Content-Type: multipart/alternative; boundary="000000000000da141605b1021b61" 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" --000000000000da141605b1021b61 Content-Type: text/plain; charset="UTF-8" On Tue, Oct 6, 2020 at 5:54 AM Tyler Adams wrote: How did globbing come about in unix? > It's been present at least since the PDP-11 migration. The Thompson shell, used in the 1st through 6th Editions, used a separate program called /etc/glob to do the dirty work, presumably in order to keep /bin/sh as small as possible. Unfortunately, glob never got its own man page, so its protocol for communicating with the shell is lost, unless someone remembers it and writes it down (hint, hint). Related, as regexes were already well known because of qed/ed, why wasn't a > subset of regular expressions used instead? > The use of * and ? along with file extensions preceded by dot (as in ".c" and ".o") are, or so it seems to me, an inheritance from the DEC operating systems, starting with Monitor (later called TOPS-10) in 1964 and going right through OpenVMS. In the file systems used by those OSes, the "filename" (typically up to 6 characters) and the "extension" (typically up to 3 characters) were stored separately both on disk and in memory, and the separating dot was parsed by user programs before invoking the appropriate kernel routine. (That is why it is still true in WIndows that "foo" and "foo." refer to the same file.) Because dot was not in any way magic to the Unix file system, and because file names were limited to 14 characters, extensions were kept short. However, the path that leads from DEC OSes to CP/M to MS-DOS to Windows has kept the 3-letter extension alive, and we now see plenty of it in Unix-style OSes. Thus using dot to mean "any character" would seriously collide with this well-established usage as the extension separator. Globbing was uninterpreted by the shell-equivalent in the DEC OSes, and was understood only by a few programs, those responsible for listing directories and copying, renaming, and deleting files. Universal globbing in the shell was AFAIK original with Unix, though Prime Computer's PRIMOS also had it and may have been earlier by a year or two. "It steam-engines when it comes steam-engine time." Both were direct descendants of Multics; I have not been able to find out anything about TIL that GNU find(1) supplements the standard -name option (which globs against the filename) with -regex (which matches the regex against the whole path). John Cowan http://vrici.lojban.org/~cowan cowan@ccil.org The Imperials are decadent, 300 pound free-range chickens (except they have teeth, arms instead of wings, and dinosaurlike tails). --Elyse Grasso --000000000000da141605b1021b61 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Oct 6, 2020 at 5:54 AM Tyler = Adams <coppero1237@gmail.com> wrote:

How did globbing come about in unix?


Related, as regexes were already well known because of qed/ed, why= wasn't a subset of regular expressions used instead?

The use of * and ?=C2=A0 along with file ext= ensions preceded by dot (as in ".c" and ".o") are, or s= o it seems to me, an inheritance from the DEC operating systems, starting w= ith Monitor (later called TOPS-10) in 1964 and going right through OpenVMS.= =C2=A0 In the file systems used by those OSes, the "filename" (ty= pically up to 6 characters) and the "extension" (typically up to = 3 characters) were stored separately both on disk and in memory, and the se= parating dot was parsed by user programs before invoking the appropriate ke= rnel routine.=C2=A0 (That is why it is still true in WIndows that "foo= " and "foo." refer to the same file.)=C2=A0=C2=A0
=
Because=C2=A0dot was not in any way magic to the Unix file s= ystem, and because file names were limited to 14 characters, extensions wer= e kept short.=C2=A0 However, the path that leads from DEC OSes to CP/M to M= S-DOS to Windows has kept the 3-letter extension alive, and we now see plen= ty of it in Unix-style OSes.=C2=A0 Thus using dot to mean "any charact= er" would seriously collide with this well-established usage as the ex= tension separator.

Globbing was uninterpr= eted by the shell-equivalent in the DEC OSes, and was understood only by a = few programs, those responsible for listing directories and copying, renami= ng, and deleting files.=C2=A0 Universal globbing in the shell was AFAIK ori= ginal with Unix, though Prime Computer's PRIMOS also had it and may hav= e been earlier by a year or two.=C2=A0 "It steam-engines when it comes= steam-engine time."=C2=A0 Both were direct descendants of Multics; I = have not been able to find out anything about=C2=A0
<= div>
TIL that GNU find(1) supplements the standard -name opti= on (which globs against the filename) with -regex (which matches the regex = against the whole path).



=
John Cowan =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0http://vrici.lojban.org/~cowan =C2=A0 =C2=A0 =C2=A0 = =C2=A0cowan@ccil.org
The Imperials= are decadent, 300 pound free-range chickens (except they have
teeth, ar= ms instead of wings, and dinosaurlike tails). =C2=A0--Elyse Grasso

--000000000000da141605b1021b61--