[Bug 4243] New: hush parsing of ${1+"$@"}
bugzilla at busybox.net
bugzilla at busybox.net
Fri Sep 23 10:24:10 UTC 2011
https://bugs.busybox.net/show_bug.cgi?id=4243
Summary: hush parsing of ${1+"$@"}
Product: Busybox
Version: 1.19.x
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Standard Compliance
AssignedTo: unassigned at busybox.net
ReportedBy: christian.haggstrom at intel.com
CC: busybox-cvs at busybox.net
Estimated Hours: 0.0
Created attachment 3613
--> https://bugs.busybox.net/attachment.cgi?id=3613
adds test for ${1+"$@"}
We have some shell scripts that needs to be compatible among many shells, and
we use ${1+"$@"} instead of "$@" in some wrapper script for the reasons
described here:
http://www.gnu.org/s/hello/manual/autoconf/Shell-Substitutions.html
Now, busybox ash and hush both interpret it differenly than bash. I tried with
the git HEAD.
$ echo 'for x in ${1+"$@"}; do echo $x; done' > testscript
$ ./hush testscript "a b"
"a
b"
$ bash testscript "a b"
a b
$ ./hush -v
BusyBox v1.20.0.git (2011-09-23 11:11:24 CEST) multi-call binary.
I haven't been able to find what the POSIX standard says about ${1+"$@"}, so
please close the bug report if you believe it is non-standard behaviour.
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list