2019-06-22 13:57:44 +0100, Harald van Dijk:
[...]
> > But in bash5's
> > 
> > files='/a/\b/??/x/*'
> > 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?
[...]

Sorry, my bad.

You're right.

I made the wrong assumptions based on the fact that

a='/a/\b'; echo $a

expands to /a/b when /a is readable and /a/\b when not,
suggesting \ is a "pattern character" in that case.

-- 
Stephane

Reply via email to