Robert Elz <k...@munnari.oz.au> wrote, on 12 Apr 2018: > > Date: Thu, 12 Apr 2018 13:25:01 +0100 > From: Geoff Clare <g...@opengroup.org> > > | Yes there is. I quoted it earlier in this thread. > > I know that, but that's useless for this purpose. We know the quoted > (part of) the string is treated literally, and handed to the pattern matching > code, > exactly as is, with no conversions performed upon it. > > But now what is the pattern matching code supposed to do with that > string?
It treats them as literal characters, just as 2.2.3 says. > Where does it say (aside from the 985 resolution) that those characters > mean anything different in a pattern than they would in a pattern given > anywhere else? The statement "shall preserve the literal value of all characters" in 2.2.3 is sufficient. > Eg: if I do > > find . -name '[a-z]*' -print > > are you suggesting that because that '[' '-' and '*' are qoted they are not to > be given their normal pattern (class, range and "all") meanings ? The shell passes the literal characters [a-z]* to find. What find does with those is specified in the description of find. > Obviously not. > > What about > > find . -name '"[a-z]*"' -print? The shell passes the literal characters "[a-z]*" to find. What find does with those is specified in the description of find. > So in > > ls "[a-z]*" > > given that quote removal is not performed before the filename expansion, > exactly what text in the standard says the quotes should be treated > differently > in this than in the 2nd find example above? The shell passes the literal characters [a-z]* to ls. What ls does with those is specified in the description of ls. -- Geoff Clare <g.cl...@opengroup.org> The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England