On Mai 10 2021, Greg Wooledge wrote: > On Mon, May 10, 2021 at 09:12:33PM +1000, AlvinSeville7cf wrote: >> x=test >> case $x in >> "test") echo Y >> esac >> >> Pattern is quoted but no quote removal is performed according to docs. > > Quote removal is essential, because of the way the empty string > is matched: > > case $foo in > "") echo "foo is empty";; > ... > > So, it may be a documentation omission, or maybe it's mentioned in some > other paragraph, but either way quote removal definitely happens here.
IIUC there is no need for quote removal, because quoting is part of the rules for pattern matching. 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."