]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/dollar-star7.sub
Bash-4.3 patch 7
[thirdparty/bash.git] / tests / dollar-star7.sub
CommitLineData
ac50fbac
CR
1# if IFS side effects in ${IFS=} assignments take place, how do you cope with
2# later changes to IFS in the same set of expansions? You've already
3# committed to using the first character of the (old) IFS to expand $* in
4# the previous expansions, and changing it to not include ' ', for instance,
5# results in the first couple of ${*} below not being split at all
6
7set -f -- a b c
8
9unset -v IFS
10printf '<%s> ' ${*}${IFS=}${*}${IFS:=-}"${*}"
11echo
12printf "after 1: IFS "
13echo "${IFS-unset}"
14recho "$*"
15
16set -f -- a 'b c' d
17unset -v IFS
18printf '<%s> ' ${*}${IFS=}${*}${IFS:=-}"${*}"
19echo
20printf "after 2: IFS "
21echo "${IFS-unset}"
22recho "$*"
23
24unset -v IFS
25recho $*
26recho "$*"
27
28IFS=' '
29recho $*
30recho "$*"