The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: John Cowan <cowan@ccil.org>
To: George Michaelson <ggm@algebras.org>
Cc: The Eunuchs Hysterical Society <TUHS@tuhs.org>
Subject: Re: [TUHS] Origins of globbing
Date: Tue, 6 Oct 2020 23:14:57 -0400	[thread overview]
Message-ID: <CAD2gp_S1Cxu2F94T4g4qRUCjUJ+sHRV7cySZd7YnODngxD5cpQ@mail.gmail.com> (raw)
In-Reply-To: <CAKr6gn3ZqZ6a6BbFVdwt2UawrHubw8U5MLXJgm9_=_6n2oNbUg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2084 bytes --]

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 <ggm@algebras.org> 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; <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.  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

[-- Attachment #2: Type: text/html, Size: 2942 bytes --]

  parent reply	other threads:[~2020-10-07  3:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 15:44 Noel Chiappa
2020-10-06 23:11 ` George Michaelson
2020-10-06 23:21   ` Jon Steinhart
2020-10-07  0:23     ` Warner Losh
2020-10-07  0:32       ` George Michaelson
2020-10-07  0:33         ` Jon Steinhart
2020-10-07  3:14   ` John Cowan [this message]
2021-02-04 21:29     ` Greg A. Woods
  -- strict thread matches above, loose matches on Subject: below --
2020-10-06  9:53 Tyler Adams
2020-10-06 15:17 ` John Cowan
2020-10-07  2:25   ` Random832
2020-10-07  2:58     ` George Michaelson
2020-10-07  9:22       ` arnold
2020-10-07  9:45         ` Michael Kjörling
2020-10-08  3:45           ` John Cowan
2020-10-09 18:21             ` Random832
2020-10-08  0:18       ` Dave Horsfall
2020-10-08  0:33         ` Larry McVoy
2020-10-08  2:35         ` Dave Horsfall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAD2gp_S1Cxu2F94T4g4qRUCjUJ+sHRV7cySZd7YnODngxD5cpQ@mail.gmail.com \
    --to=cowan@ccil.org \
    --cc=TUHS@tuhs.org \
    --cc=ggm@algebras.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).