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")'
31 declare -a DIRSTACK='()'
32 declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
33 declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")'
35 declare -a d='([1]="" [2]="bdef" [5]="hello world" [6]="test" [9]="ninth element")'
36 declare -a e='([0]="test")'
37 declare -a f='([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element")'
38 ./array.tests: a: readonly variable
39 ./array.tests: b[]: bad array subscript
40 ./array.tests: b[*]: bad array subscript
41 ./array.tests: ${b[ ]}: bad substitution
42 ./array.tests: c[-2]: bad array subscript
43 ./array.tests: c: bad array subscript
45 ./array.tests: d[7]: cannot assign list to array member
46 ./array.tests: []=abcde: bad array subscript
47 ./array.tests: [*]=last: cannot assign to non-numeric index
48 ./array.tests: [-65]=negative: bad array subscript
49 declare -a DIRSTACK='()'
50 declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
51 declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")'
53 declare -a d='([1]="test test")'
54 declare -a f='([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element")'
55 ./array.tests: unset: ps1: not an array variable
56 ./array.tests: declare: c: cannot destroy array variables in this way
58 this is a test of read using arrays
60 this is a test of arrays
61 declare -a DIRSTACK='()'
62 declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression")'
63 declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")'
65 declare -a d='([1]="test test")'
66 declare -a f='([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element")'
67 declare -a rv='([0]="this" [1]="is" [2]="a" [3]="test" [4]="of" [5]="read" [6]="using" [7]="arrays")'
86 /bin /usr/bin /usr/ucb /usr/local/bin . /sbin /usr/sbin
87 bin bin ucb bin . sbin sbin
91 \bin \usr/bin \usr/ucb \usr/local/bin . \sbin \usr/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
104 value = new1 new2 new3
105 ./array.tests: narray: unbound variable
108 for case if then else
113 ./array.tests: array assign: line 263: syntax error near unexpected token `for'
114 ./array.tests: array assign: line 263: `a b c for case if then else'
115 ./array.tests: array assign: line 265: syntax error near unexpected token `for'
116 ./array.tests: array assign: line 265: `for case if then else'
117 ./array.tests: array assign: line 267: syntax error near unexpected token `<>'
118 ./array.tests: array assign: line 267: ` <> < > ! '
119 ./array.tests: array assign: line 268: syntax error near unexpected token `[1]=<>'
120 ./array.tests: array assign: line 268: ` [1]=<> [2]=< [3]=> [4]=! '