@aliss@outerheaven.club @helene@p.helene.moe im not sure what POSIX says on case’s patterns behaviorokay, so
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_04_05see Pattern Matching Notation
that is matched by the string resulting from the tilde expansion, parameter expansion, command substitution, arithmetic expansion, and quote removal of the given wordLet's go to Pattern Matching Notation: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13If any character (ordinary, shell special, or pattern special) is quoted, that pattern shall match the character itself. The shell special characters always require quoting.
When unquoted and outside a bracket expression, the following three characters shall have special meaning in the specification of patternsthis raises the question of what happens when you have a quoted variable expansion - is the expanded output considered quoted or not?
let's look at https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02
which sends us to https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
. . . which has nothing to say on the matter
POSIX is ultimately an "unfinished" (or rather, incomplete - open to interpretation) specification, especially when it comes to shell
and this is where the potential differnence lies
welcome to hell
Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 08:59:17 JST
-
Embed this notice
Tosti ? (tost@mk.toast.cafe)'s status on Monday, 19-Sep-2022 08:59:17 JST Tosti ?