1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
# these should produce the same results
a=(aa bb)
set -- aa bb
IFS=+
recho ${a[@]}
recho ${a[@]:0}
recho $@
recho ${@:1}
A=${a[*]} B=${a[*]:0}
recho $* ${*:1}
recho ${a[*]} ${a[*]:0}
recho "$A" "$B"
recho $A $B
unset A B
recho ${@/a/x}
recho ${a[@]/a/x}
recho "${@/a/x}"
recho "${a[@]/a/x}"
recho ${*/a/x}
recho ${a[*]/a/x}
recho "${*/a/x}"
recho "${a[*]/a/x}"
A=${*/a/x}
B=${a[*]/a/x}
recho "$A" "$B"
unset A B
declare -A A
A[0]=aa
A[1]=bb
recho ${A[@]/a/x}
recho "${A[@]/a/x}"
recho ${A[*]/a/x}
recho "${A[*]/a/x}"
unset A
IFS=
recho ${@/a/x}
recho ${a[@]/a/x}
recho "${@/a/x}"
recho "${a[@]/a/x}"
recho ${*/a/x}
recho ${a[*]/a/x}
recho "${*/a/x}"
recho "${a[*]/a/x}"
A=${*/a/x}
B=${a[*]/a/x}
recho "$A" "$B"
unset A B
declare -A A
A[0]=aa
A[1]=bb
recho ${A[@]/a/x}
recho "${A[@]/a/x}"
recho ${A[*]/a/x}
recho "${A[*]/a/x}"
unset A
IFS=+
recho ${a[@]}
recho ${a[@],,}
recho "${a[@]}"
recho "${a[@],,}"
A=${a[*]} B=${a[*],,}
recho $* ${*,,}
recho ${a[*]} ${a[*],,}
recho "${a[*]}" "${a[*],,}"
recho "$A" "$B"
recho $A $B
unset A B
declare -A A
A[0]=aa
A[1]=bb
recho ${A[@],,}
recho "${A[@],,}"
recho ${A[*],,}
recho "${A[*],,}"
unset A
recho ${a[@]#?}
recho ${@#?}
A=${a[*]#?} B=${a[*]#?}
recho ${*#?} ${a[*]#?}
recho "$A" "$B"
recho $A $B
unset A B
declare -A A
A[0]=aa
A[1]=bb
recho ${A[@]#?}
recho "${A[@]#?}"
recho ${A[*]#?}
recho "${A[*]#?}"
|