I never asked the originators. In fact, I don't think I've ever used glob outside of the shell...It's interesting to contemplate how the world might be different if we had used regular expressions consistently in the shell as well as the editor(s). We could have picked some other character like : to indicate the file extension. I suspect we would have had regular expressions built into all kinds of things...Steve
----- Original Message -----From:"Doug McIlroy" <doug@cs.dartmouth.edu>To:<tuhs@minnie.tuhs.org>Cc:Sent:Sun, 09 Jul 2017 08:26:56 -0400Subject:Re: [TUHS] origin of the name 'glob'Glob was an an accident. When Ken and Dennis wanted to put wildcards
(an anachronistic word--it wasn't used in the Unix lab at the time)
into the shell, there wasn't room, so they came up with the clever hack
of calling another process to do the work.
I have always understood that glob meant global because commands like
rm *
would be applied to every file in a directory. A relationship to ed's
g command was clear, but not primary in my mind.
One curious fact is that from day one the word hase been pronounced glob,
not globe. (By contrast, creat has been variously pronounced cree-at
and create.) It is also interesting to speculate on whether there would
be a glob library routine in Linux had glob only been an identifier in
sh.c rather than an entry in /bin.
I believe the simple * was borrowed from somewhere else. If the g command
had been the driving model, glob would probably have had ? and ?*, not
? and *. (It couldn't use ed's . because . was ubiquitous in file names.)
My etymology is somewhat different from Steve's. But I never asked the
originator(s). Steve, did you?
Doug