Robert Elz <k...@munnari.oz.au> wrote, on 13 Apr 2018: > > I think we have had enough of this topic, so I will not continue it > after this message, but... > > | I maintain that the requirements of 2.2.3 are indeed universal. > > If that's true, then surely those words must be read in conjunction with > what the initial paragraph of 2.2 says ... > > Quoting is used to remove the special meaning of certain characters > or words to the shell. > Quoting can be used to preserve the literal meaning of the special > characters in the next paragraph [continues about reserved words etc.] > > The "special characters in the next paragraph" are ... > > | & ; < > ( ) $ ` \ " ' <space> <tab> <newline> > > and sometimes, where "depending on conditions described elsewhere" > > * ? [ # ~ =% > > Note that '-' is not in the list anywhere. If we read that literally, it is > saying that quoting is not intended to remove any special meaning of > characters other than the ones listed, which includes '-', which I would > submit means that if you want to have quotes remove the special meaning > of '-' in char classes in glob expressions, it needs to be explicitly stated.
Thank you for spotting this. It looks to be an editorial oversight in 2.2. (I think the purpose of that introductory text is to warn shell script writers about which characters they need to think about quoting if they want them to be treated literally.) The lack of '-' in 2.2 doesn't change the requirements of 2.2.3, since 2.2.3 says "all characters", not "the characters listed in 2.2". -- Geoff Clare <g.cl...@opengroup.org> The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England