Date:        Thu, 12 Apr 2018 13:25:01 +0100
    From:        Geoff Clare <>
    Message-ID:  <20180412122501.GA8783@lt2.masqnet>

  | 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 
exactly as is, with no conversions performed upon it.

But now what is the pattern matching code supposed to do with that

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?

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 ?

Obviously not.

What about

        find . -name '"[a-z]*"' -print?

There quotes get handed to find as part of the arg, but quotes mean nothing
to pattern matching normally, so this one should look for file names that begin
and end with double quote characters, and have a lower-case alpha as the
first character after the leading ".   Right?

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?

Note in all of this I am not questioning what should be done, or what shells
actually do, but rather how I work out from the text in the standard what
should be done.


Reply via email to