On 26/11/2015 20:44, Gioele Barabucci wrote:
Hello, I am forwarding a bug [1] reported by a Debian user: dash incorrectly uses `$*` instead of the requested `$@` inside variable assignments. The current version of dash is affected by this bug. A simple test from the original reporter: $ dash -c 'IFS=:$IFS ; set -- a b c ; echo "$@" ; x="$@" ; echo "$x"' a b c a:b:c $ bash --posix -c 'IFS=:$IFS ; set -- a b c ; echo "$@" ; x="$@" ; echo "$x"' a b c a b c
The behaviour for "$@" is underspecified except for very specific situations. Both behaviours are very defensible. There is an attempt to clear up the requirements for the future, but even with the cleared up wording, the behaviour of var=$@ and var="$@" would remain unspecified. See <http://austingroupbugs.net/view.php?id=888> for details.
Cheers, Harald van Dijk
This error is reproducible with dash 0.5.7 and with the current master git master branch, commit 2e5842258bd5b252ffdaa630db09c9a19a9717ca. [1] https://bugs.debian.org/764365 -- Gioele Barabucci <gioele@xxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe dash" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
-- To unsubscribe from this list: send the line "unsubscribe dash" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html