Maybe an upstream problem and not gentoo specific. The man page of app-shells/dash states under 'Parameter Expansion': "The parameter name or symbol can be enclosed in braces, which are optional except for positional parameters with more than one digit or [...]" IIRC this is also what is defined by the posix standard. The behaviour though is that a shell script using dash as shell accepts $10 (without {}) as the 10th parameter. - testscript.sh ---- #!/bin/dash echo $1-$10-${10}- ---- when called like: ./testscript.sh first should print: 'first-first0--' but prints instead: 'first---'
That's outputting "$10" as the value of "$1", followed by the string "0", exactly like the spec says =)
Nevermind! I had your expected/actual cases reversed. Sorry for the noise.
Reported upstream at https://www.mail-archive.com/dash@vger.kernel.org/msg01878.html
This can be closed as no affected versions remain in the gentoo repo.