[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How the ls command interpret this?

From: Kaz Kylheku (Coreutils)
Subject: Re: How the ls command interpret this?
Date: Sun, 30 Jul 2017 20:54:20 -0700
User-agent: Roundcube Webmail/0.9.2

On 30.07.2017 13:46, Reuti wrote:
Hash: SHA1

Is that necessary?

What's the use of reducing your plausible deniability of rubbish postings?

Am 03.07.2017 um 20:30 schrieb BaBa:

Le 2017-07-03 19:17, Eric Blake a écrit :
Case 3:
$ mkdir foo
$ cd foo
$ touch a[b]    # the glob doesn't match, so it is passed unchanged
$ ls ?[b]       # the glob doesn't match, so it is passed unchanged
ls: cannot access '?[b]': No such file or directory
$ cd ..
$ rm -rf foo

Yes understood, the glob didn't match.

And if globbing fails, it won't try it without.

Try what without what?

If globbing fails, then what happens is that the
unexpanded glob pattern remains. (That's the POSIX shell behavior;
GNU Bash has a "nullglob" flag which causes non-matching globs to
expand to nothing, and the GNU C Library's glob() function has
a similar flag.)

I mean, it could use
?'[b]' and try again which would succeed.

Why would globbing re-try with random permutations of the pattern

(Why not also '?'[b]? Why not ?'['b]?)

Such a ridiculous complication of its specification of behavior
wouldn't help anyone; only lay traps for the unwary script writer.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]