On Aug 24 2021, dietmar_schind...@web.de wrote: > In the section > https://www.gnu.org/software/bash/manual/bash.html#Conditional-Constructs > in the description of the "case" command there is no mention (as far as I > can see, it doesn't follow from the documented expansions etc.) that a > _pattern_ undergoes quote removal, but it does [see e. g. case aa in a""a) > echo match;; esac]. (One might think it does self-evidently in the process > of "Shell Expansions" performed on the command line, but this expansion > series is not performed on the case command's _word_ and patterns - they for > example don't undergo brace expansion -; for _word_, it is explicitly said: > "The _word_ undergoes tilde expansion, parameter expansion, command > substitution, arithmetic expansion, and quote removal …"; for _pattern_: > "Each _pattern_ undergoes tilde expansion, parameter expansion, command > substitution, and arithmetic expansion." - quote removal is missing.)
That's because quote removal is _not_ performed. The quotes are significant for pattern matching, which needs to respect quoting. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."