https://bugzilla.novell.com/show_bug.cgi?id=331884#c17
--- Comment #17 from Dr. Werner Fink 2007-10-11 02:30:57 MST ---
Simple test:
bash> set -- ''
bash> find ${1+"$@"}
find: invalid predicate `'
bash> set --
bash> find ${1+"$@"}
.
./README.import
./source-dvipdfm-security.patch
./source-poppler.dif
./source-warns.dif
./texmfsrc.tar.bz2
it is the empty string (no space) which endure due to the double quotes
around the $@ witin ${1+"$@"} ... this is intended, see manual page of the
bash in the section `Special Parameters':
[...]
@ Expands to the positional parameters, starting from one. When
the expansion occurs within double quotes, each parameter
expands to a separate word. That is, "$@" is equivalent to "$1"
"$2" ... When there are no positional parameters, "$@" and $@
expand to nothing (i.e., they are removed).
[...]
this can be used to let blanks and spaces survive an expansion:
bash> mkdir 'a b'
bash> set -- 'a b'
bash> echo $1
a b
bash> find ${1+"$@"} -ls
54540903 0 drwxr-xr-x 2 werner suse 6 Oct 11 10:28 a\ b
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.