1 # first, let's start with the basics
13 # If IFS is null, the parameters are joined without separators
17 # If IFS is unset, the parameters are separated by spaces
25 set bob 'tom dick harry' joe
32 set bob 'tom dick harry' joe
39 set bob 'tom dick harry' joe
46 set bob 'tom dick harry' joe
53 # according to POSIX.2, unquoted $* should expand to multiple words if
54 # $IFS is null, just like unquoted $@
56 set bob 'tom dick harry' joe
63 set bob 'tom dick harry' joe
70 # if IFS is unset, the individual positional parameters are split on
71 # " \t\n" if $* or $@ are unquoted
73 set bob 'tom dick harry' joe
80 set bob 'tom dick harry' joe
87 # but not for "$@" or "$*"
88 set bob 'tom dick harry' joe
95 set bob 'tom dick harry' joe
102 # POSIX.2 says these should both expand the positional parameters
109 # this example is straight from the POSIX.2 rationale
124 set -- 1 2 3 4 5 6 7 8 9 10
143 eval foo3='$*' bar3='${*}'
186 eval foo3='$*' bar3='${*}'
210 # tests for special expansion of "$*" and "${array[*]}" when used with other
211 # expansions -- bugs through bash-2.05b
212 ${THIS_SH} ./dollar-star1.sub
214 # tests for expansion of "$@" on rhs of things like ${param:+word}. Bugs
216 ${THIS_SH} ./dollar-at1.sub
218 # tests for expansion of other variables in double-quoted strings containing
219 # $@. Bugs through bash-2.05b
220 ${THIS_SH} ./dollar-at2.sub
222 # tests for various expansions of $* in different contexts -- word split,
223 # no splitting, etc. when $IFS is NUL
224 ${THIS_SH} ./dollar-star2.sub