24 /bin:/usr/bin:/usr/local/bin:.
25 declare -a avar=([0]="/bin:/usr/bin:/usr/local/bin:.")
32 braceexpand:hashall:interactive-comments
34 braceexpand:hashall:interactive-comments:physical
35 declare -r SHELLOPTS="braceexpand:hashall:interactive-comments:physical"
59 FIN: asdf fdsa, asdf fdsa
63 ./varenv4.sub: line 67: bbb: unique: cannot convert indexed to associative array
64 ./varenv4.sub: line 67: declare: unique: cannot convert indexed to associative array
66 declare -Ar FOOBAR=([foo]="bar" )
67 declare -Ar FOOBAR=([foo]="bar" )
68 declare -ar FOOBAR2=([0]="bar")
69 declare -ar FOOBAR2=([0]="bar")
72 declare -ar outside=()
73 declare -ir outside1="1"
76 declare -ar myvar=([0]="0")
79 declare -rx tempvar1='foo'
80 declare -rx tempvar2='qux'
81 ./varenv7.sub: line 57: local: var: readonly variable
95 in o1 (readonly modifying local scalars):
99 ./varenv9.sub: line 28: declare: i1: not found
100 ./varenv9.sub: line 28: declare: j1: not found
101 in o2 (readonly setting global scalars):
102 declare -r i2="a b c"
103 declare -r j2="1 2 3"
105 declare -r i2="a b c"
106 declare -r j2="1 2 3"
107 ./varenv9.sub: line 46: unset: i2: cannot unset: readonly variable
108 ./varenv9.sub: line 46: unset: j2: cannot unset: readonly variable
109 in o3 (readonly modifying locals, converting to arrays):
110 declare -ar i3=([0]="a" [1]="b" [2]="c")
111 declare -ar j3=([0]="1" [1]="2" [2]="3")
113 ./varenv9.sub: line 61: declare: i3: not found
114 ./varenv9.sub: line 61: declare: j3: not found
115 in o4 (readonly setting global array variables):
116 declare -ar i4=([0]="a" [1]="b" [2]="c")
117 declare -ar j4=([0]="1" [1]="2" [2]="3")
119 declare -ar i4=([0]="a" [1]="b" [2]="c")
120 declare -ar j4=([0]="1" [1]="2" [2]="3")
121 ./varenv9.sub: line 79: unset: i4: cannot unset: readonly variable
122 ./varenv9.sub: line 79: unset: j4: cannot unset: readonly variable
126 main: after first call: X
129 main: after second call: X
131 after func: x = outside
132 ./varenv11.sub: line 17: local: qux: readonly variable
133 ./varenv11.sub: line 18: qux: readonly variable
134 ./varenv11.sub: line 18: local: qux: readonly variable
135 declare -A foo=([zero]="zero" [one]="one" )
136 declare -a bar=([0]="zero" [1]="one")
137 declare -A foo=([one]="one" [zero]="zero" )
138 declare -a bar=([0]="zero" [1]="one")
139 ./varenv11.sub: line 42: a: readonly variable
145 inside: declare -- foo
148 inside: declare -x var="value"
149 outside: declare -- var="one"
150 inside: declare -x var="value"
151 outside: declare -- var="outside"
152 inside: declare -x var="inside"
153 outside: declare -- var="outside"
157 outside 2.0: var=<unset>
159 outside 2.1: var=global
160 inside func1: var=value
161 outside 3.0: var=value
162 inside func2: var=global
163 outside 4.0: var=outside
165 after foo: var=global
167 after bar: var=global
168 ./varenv13.sub: line 16: `var[0]': not a valid identifier
169 ./varenv13.sub: line 16: `var[@]': not a valid identifier
170 ./varenv13.sub: line 14: declare: var: not found
171 ./varenv13.sub: line 25: var[@]: bad array subscript
172 declare -A var=([0]="X" )
174 ./varenv13.sub: line 34: `var[0]': not a valid identifier
176 declare -A var=([0]="X" )
177 declare -A var=([Y]="Y" )
178 declare -A var=([Y]="Y" )
181 ./varenv14.sub: line 31: f: var: cannot convert indexed to associative array
182 ./varenv14.sub: line 31: declare: var: cannot convert indexed to associative array
183 declare -a var=([0]="12")
184 declare -a a=([0]="X")
185 declare -a s=([0]="X")
186 declare -a a=([0]="X" [1]="Y")
187 declare -a s=([0]="X" [1]="Y")
188 declare -a a=([0]="XY")
189 declare -a s=([0]="XY")
190 f: 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
191 f1: after: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
192 done: 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
213 before source: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
214 varenv15.in: before set: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
215 varenv15.in: after set: a b c d e f g h i j k l m n o p q r s t u v w x y z
216 after source 1: a b c d e f g h i j k l m n o p q r s t u v w x y z
217 varenv15.in: before set: one two three four five six seven eight nine ten
218 varenv15.in: after set: a b c d e f g h i j k l m n o p q r s t u v w x y z
219 after source 2: a b c d e f g h i j k l m n o p q r s t u v w x y z
220 foo=showfoo environment foo=showfoo
221 foo=showfoo environment foo=showfoo
222 foo=showfoo environment foo=showfoo
226 foo=showfoo environment foo=showfoo
227 outside 1.0: foo=<unset>
228 foo=showfoo environment foo=showfoo
229 foo=showfoo environment foo=showfoo
230 outside 1.1: foo=<unset>
231 foo=<unset> environment foo=
232 outside 2.0: foo=<unset>
233 foo=foo environment foo=foo
234 foo=<unset> environment foo=
235 outside 2.1: foo=<unset>
236 declare -- var="global"
238 declare -- var="local"
239 declare -- var="global"
240 declare -- var="local"
242 declare -- var="local"
244 declare -- var="local"
246 declare -- var="local"
248 declare -- var="local"
249 declare -a arr=([0]="zero" [1]="one" [2]="two" [3]="three" [4]="four" [5]="five")
250 declare -a arr=([0]="zero" [1]="one" [2]="two")
251 declare -a arr=([0]="three" [1]="four" [2]="five")
252 declare -a arr=([0]="zero" [1]="one" [2]="two")
257 declare -a x=([0]="one" [1]="two" [2]="three")
258 ./varenv19.sub: line 51: declare: x: not found