The old behaviour is:
for var in $*
do
echo "$var"
done
And you get this:
$ sh test.sh 1 2 '3 4'
1
2
3
4
Changing it to:
for var in "$@"
do
echo "$var"
done
will correctly expand to:
$ sh test.sh 1 2 '3 4'
1
2
3 4
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Mar 15 05:26:17 CET 2017 on sn-devel-144
testit () {
name="$1"
shift
- cmdline="$*"
+ cmdline="$@"
subunit_start_test "$name"
output=`$cmdline 2>&1`
status=$?
testit_expect_failure () {
name="$1"
shift
- cmdline="$*"
+ cmdline="$@"
subunit_start_test "$name"
output=`$cmdline 2>&1`
status=$?