On Tue, Aug 24, 2021, at 4:44 PM, Dietmar P. Schindler wrote: > Doesn't the example I gave above show that quotes are removed? If they > weren't, how could word aa with pattern a""a constitute a match?
The quotes are handled by the matching process itself, *not* as
part of the usual shell expansions. Otherwise these patterns would
be equivalent, but they're not.
% cat /tmp/foo.sh
case $1 in
'a?a') echo one ;;
a?a) echo two ;;
esac
% bash /tmp/foo.sh 'a?a'
one
% bash /tmp/foo.sh aaa
two
--
vq
