Robert Elz <> 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.

> 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


Geoff Clare <>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

Reply via email to