1set -- abc "d e"
2
3echo 'Testing: !IFS $*'
4unset IFS; for a in $*; do echo ".$a."; done
5echo 'Testing: !IFS $@'
6unset IFS; for a in $@; do echo ".$a."; done
7echo 'Testing: !IFS "$*"'
8unset IFS; for a in "$*"; do echo ".$a."; done
9echo 'Testing: !IFS "$@"'
10unset IFS; for a in "$@"; do echo ".$a."; done
11
12echo 'Testing: IFS="" $*'
13IFS=""; for a in $*; do echo ".$a."; done
14echo 'Testing: IFS="" $@'
15IFS=""; for a in $@; do echo ".$a."; done
16echo 'Testing: IFS="" "$*"'
17IFS=""; for a in "$*"; do echo ".$a."; done
18echo 'Testing: IFS="" "$@"'
19IFS=""; for a in "$@"; do echo ".$a."; done
20
21echo 'Testing: !IFS v=$*'
22unset IFS; v=$*; echo "v='$v'"
23echo 'Testing: !IFS v=$@'
24unset IFS; v=$@; echo "v='$v'"
25echo 'Testing: !IFS v="$*"'
26unset IFS; v="$*"; echo "v='$v'"
27echo 'Testing: !IFS v="$@"'
28unset IFS; v="$@"; echo "v='$v'"
29
30echo 'Testing: IFS="" v=$*'
31IFS=""; v=$*; echo "v='$v'"
32echo 'Testing: IFS="" v=$@'
33IFS=""; v=$@; echo "v='$v'"
34echo 'Testing: IFS="" v="$*"'
35IFS=""; v="$*"; echo "v='$v'"
36echo 'Testing: IFS="" v="$@"'
37IFS=""; v="$@"; echo "v='$v'"
38
39# Note: in IFS="" v=$@ and IFS="" v="$@" cases, bash produces "abc d e"
40# We produce "abcd e"
41
42echo Finished
43