Robert Elz <k...@munnari.oz.au> wrote, on 11 Apr 2018:
>
> Lower down, it says ...
> 
>       In order from the beginning to the end of the case statement, each 
> pattern
>       that labels a compound-list shall be subjected to tilde expansion, 
> parameter
>       expansion, command substitution, and arithmetic expansion, and the 
> result
> [note: no quote removal]
>       of these expansions shall be compared against the expansion of word,

The missing quote removal here is a known defect in the standard.
See http://austingroupbugs.net/view.php?id=985

> Not doing quote removal on patterns is correct.

No it isn't.  As bug 985 notes:

$ case 'foo  bar' in "foo  bar") echo "quotes removed";; esac
quotes removed

If quote removal were not performed on the patterns, this would not match.
You would see:

$ case '"foo  bar"' in "foo  bar") echo "quotes not removed";; esac
quotes not removed

instead.

-- 
Geoff Clare <g.cl...@opengroup.org>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

Reply via email to