The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Random832 <random832@fastmail.com>
To: TUHS <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] Origins of globbing
Date: Tue, 06 Oct 2020 22:25:37 -0400	[thread overview]
Message-ID: <b25b12b8-8093-4e4a-aceb-b9a13853a0fa@www.fastmail.com> (raw)
In-Reply-To: <CAD2gp_QmPMYiWrRN+RvaF+4VyXfTZLn-oWZ_gg3Rs3LAVswzWA@mail.gmail.com>

On Tue, Oct 6, 2020, at 11:17, John Cowan wrote:
> 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

it's worth mentioning that "universal" globbing comes with restrictions that operating systems where programs interpret globs don't have: you can't reliably pass a glob as an option argument, or as an argument which refers to files that do not exist in the filesystem, without quoting it, which requires additional quoting when you want a literal * or ? character. Quoting is also required even when the argument position is not semantically a set of filenames at all.

Also, since you mentioned renaming, MS-DOS/Windows, at least, has a primitive 'rename one glob to another' [it has rules that technically give meaning to any destination glob, but it's most sensible when you want to change the filename extension of a set of files] function that's not possible either on Unix [though utilities do exist to perform various transformations on the name of a set of files to be renamed]

Although, sometimes the results can be surprising - the MS-DOS/Windows "copy" command, for example, *concatenates* a globbed set of files [achievable with a list of filenames by separating them with plus signs] rather than copying them separately into a destination directory.

  reply	other threads:[~2020-10-07  2:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06  9:53 Tyler Adams
2020-10-06 15:17 ` John Cowan
2020-10-07  2:25   ` Random832 [this message]
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
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
2021-02-04 21:29     ` Greg A. Woods

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=b25b12b8-8093-4e4a-aceb-b9a13853a0fa@www.fastmail.com \
    --to=random832@fastmail.com \
    --cc=tuhs@minnie.tuhs.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).