1 ./array.tests: array assign: line 10: syntax error near unexpected token `&'
2 ./array.tests: array assign: line 10: `first & second'
8 declare -a DIRSTACK='()'
9 declare -a a='([0]="abcde" [1]="" [2]="bdef")'
22 bdef hello world test expression
23 ./array.tests: readonly: `a[5]': not a valid identifier
24 declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
26 declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
28 readonly -a a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
30 ./array.tests: declare: e: cannot assign to array variables in this way
32 declare -a DIRSTACK='()'
33 declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
34 declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")'
36 declare -a d='([1]="" [2]="bdef" [5]="hello world" [6]="test" [9]="ninth element")'
37 declare -a e='([0]="test")'
38 declare -a f='([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element")'
39 ./array.tests: a: readonly variable
40 ./array.tests: b[]: bad array subscript
41 ./array.tests: b[*]: bad array subscript
42 ./array.tests: ${b[ ]}: bad substitution
43 ./array.tests: c[-2]: bad array subscript
44 ./array.tests: c: bad array subscript
46 ./array.tests: d[7]: cannot assign list to array member
47 ./array.tests: []=abcde: bad array subscript
48 ./array.tests: [*]=last: cannot assign to non-numeric index
49 ./array.tests: [-65]=negative: bad array subscript
50 declare -a DIRSTACK='()'
51 declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
52 declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")'
54 declare -a d='([1]="test test")'
55 declare -a f='([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element")'
56 ./array.tests: unset: ps1: not an array variable
57 ./array.tests: declare: c: cannot destroy array variables in this way
59 this is a test of read using arrays
61 this is a test of arrays
62 declare -a DIRSTACK='()'
63 declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
64 declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")'
66 declare -a d='([1]="test test")'
67 declare -a f='([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element")'
68 declare -a rv='([0]="this" [1]="is" [2]="a" [3]="test" [4]="of" [5]="read" [6]="using" [7]="arrays")'
87 /bin /usr/bin /usr/ucb /usr/local/bin . /sbin /usr/sbin
88 bin bin ucb bin . sbin sbin
92 \bin \usr/bin \usr/ucb \usr/local/bin . \sbin \usr/sbin
93 \bin \usr\bin \usr\ucb \usr\local\bin . \sbin \usr\sbin
94 \bin \usr\bin \usr\ucb \usr\local\bin . \sbin \usr\sbin
105 value = new1 new2 new3
106 ./array.tests: narray: unbound variable
109 for case if then else
113 ./array.tests: array assign: line 257: syntax error near unexpected token `for'
114 ./array.tests: array assign: line 257: `a b c for case if then else'
115 ./array.tests: array assign: line 259: syntax error near unexpected token `for'
116 ./array.tests: array assign: line 259: `for case if then else'
117 ./array.tests: array assign: line 261: syntax error near unexpected token `<>'
118 ./array.tests: array assign: line 261: ` <> < > ! '
119 ./array.tests: array assign: line 262: syntax error near unexpected token `[1]=<>'
120 ./array.tests: array assign: line 262: ` [1]=<> [2]=< [3]=> [4]=! '