On 24/06/2019 15:16, Chet Ramey wrote:
On 6/22/19 8:57 AM, Harald van Dijk wrote:

But in bash5's

ls -d $files

That \ becomes a globbing operator, so we get the same list of
files as in a literal /a/[b]/??/x/*, not a literal /a/\b/??/x/*

That doesn't sound right. The backslash is removed per 2.13.1, and then the
path component is just "b". This does not contain a "pattern character", so
should not require search permission. I expect this to match the same thing
as /a/b/??/x/*, and both in my shell and in bash that is what I see. Has
this changed in one of the post-5.0 bash patches?

Bash-5.0 patch 3 made some changes here; what version are you using?

I was checking bash 5.0 without patches, but I see this same behaviour in bash 4.4 patch 23, 5.0 without patches, and 5.0 patch 7.

Harald van Dijk

Reply via email to