On 5/10/21 10:40 AM, Andreas Schwab wrote:
On Mai 10 2021, Chet Ramey wrote:
Either way, quote removal happens, the double quotes are removed, and
the characters between the double quotes are treated specially.
POSIX doesn't mention quote removal either. Is that a bug? There is
the parenthetical remark "(which also describes the effect of quoting
parts of the pattern)" which suggests that quote removal is indeed not
needed.
https://www.austingroupbugs.net/view.php?id=985
There are some intricate hoops to jump through to reconcile that the
quoted pattern matches and that double quotes have no special meaning
for pattern matches. The shell has to arrange for the double-quoted
characters to be treated as quoted by the pattern matcher while removing
the literal double quotes.
If you want to read a ferocious argument about quoting and shell pattern
matching, look at
https://www.austingroupbugs.net/view.php?id=1234
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/