Much appreciated. So the issue where it originally did not print OK was a bug in pbosh only?
Sorry for the late ping, but I just re-read all your replies, and it's still not clear to what this line should print according to POSIX: sh -c 'x=; case $x in "") echo OK;; *) echo BAD; esac' With the current specification, should it print OK or BAD or is it unspecified? With a future release of the specification which you mentioned, should it print OK or BAD or would it be unspecified? As I mentioned I've seen empty string pattern in examples, and I would like to know whether or not it should be...
Thanks. Right, IFS is also char-based so it's affected as well. So ${#foo}, IFS, ? wildcard in a pattern, and inside pattern bracket expression, and that's it?
Thanks. Right, IFS is also char-based so it's affected as well. So IFS, ? wildcard in a pattern, and inside pattern bracket expression, and that's it?
Slightly off topic: 30% of the CPU time used by bosh is used for multi byte character handling Is multibyte relevant anywhere other than to calculate ${#foo}, while matching ? in a pattern outside of a bracket expression, and while matching chars in a pattern inside bracket expression (both literals and classes)? I can't think of other places where it would matter for anything...
For reference, in this command: <sh> -c 'e= x=VAL; printf [%s] 1\$x 2$\x 3"\$x" 4"$\x" 5"${e:-\$x}" 6"${e:-$\x}"' Except for the final argument, all shells agree on: [1$x][2$x][3$x][4$\x][5$x] While for the final argument, some shells think it should print [6$\x], while other shells print [6$x]. (EDITED, accidentally replaced bosh with posh. see actual output below). The here-document case of ffmpeg's configure is most similar to 5"${e:-\$x}" where all shells, including [p]bosh, agree on 5$x when...
For reference, in this command: <sh> -c 'e= x=VAL; printf [%s] 1\$x 2$\x 3"\$x" 4"$\x" 5"${e:-\$x}" 6"${e:-$\x}"' Except for the final argument, all shells agree on: [1$x][2$x][3$x][4$\x][5$x] While for the final argument, some shells, including pbosh, think it should print [6$\x], while other shells, including bosh print [6$x]. The here-document case of ffmpeg's configure is most similar to 5"${e:-\$x}" where all shells, including [p]bosh, agree on 5$x when inside double quotes, but [p]bosh interprets...
For reference, in this command: <sh> -c 'e= x=VAL; printf [%s] 1\$x 2$\x 3"\$x" 4"$\x" 5"${e:-\$x}" 6"${e:-$\x}"' Except for the final argument, all shells agree on: [1$x][2$x][3$x][4$\x][5$x] While for the final argument, some shells, including pbosh, think it should print [6$\x], while other shells, including bosh print [6$x]. The here-document case of ffmpeg's configure is most similar to 5"${e:-\$x}" where all shells, including [p]bosh, agree on 5$x when inside double quotes, but [p]bosh interprets...