Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Do what comes naturally. Seethe and fume and throw a tantrum.


comp / comp.unix.shell / Watch Out For Globbing

SubjectAuthor
o Watch Out For GlobbingLawrence D'Oliveiro

1
Subject: Watch Out For Globbing
From: Lawrence D'Oliv
Newsgroups: comp.unix.shell
Organization: A noiseless patient Spider
Date: Mon, 26 Aug 2024 22:31 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.shell
Subject: Watch Out For Globbing
Date: Mon, 26 Aug 2024 22:31:50 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <vaivom$2kpjl$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 27 Aug 2024 00:31:51 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="546aa385814575b64d15f1d40accd158";
logging-data="2778741"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aXlTGeJudPhqMdJumHklH"
User-Agent: Pan/0.160 (Toresk; )
Cancel-Lock: sha1:MpWgCKrDnnGXT8y+MINMnaA9/vU=
View all headers

People who use commands across the network often don’t realize that
any globbing of filespecs happens on the local machine, not the remote
one. Example from
<https://www.zdnet.com/article/3-linux-commands-i-use-for-downloading-files-and-how-theyre-different/>:

curl http://www.example.com/file[1-5].zip

Now that will probably work, because most people won’t have a
subdirectory called “http:”, with another directory in that called
“www.example.com”, with, say, a single item in that named “file1.zip”.
Because if you did, you would find that the above command only brought
back the single item with that name.

The right thing to do, of course, when passing specs to the remote end
that look like globs, is to quote them.

1

rocksolid light 0.9.8
clearnet tor