blob: 778a28df434cf68adb41ffd82989935a1dc97966 [file] [log] [blame]
Jari Aalto31859422009-01-12 13:36:28 +00001
2: ${TMPDIR:=/tmp}
3
4mkdir $TMPDIR/bash-test-$$
5cd $TMPDIR/bash-test-$$
6
7trap "cd / ; rm -rf $TMPDIR/bash-test-$$" 0 1 2 3 6 15
8
9touch '[3]=abcde'
10
11touch r s t u v
12
13declare -a x=(*)
14
15echo ${x[3]}
16echo ${x[@]}
17
18unset x
19x=(a b c d e)
20
21echo ${x[*]: -1}
22
23unset x[4]
24unset x[2]
25
26x[9]='9'
27
28echo ${x[*]: -1}
29
30TOOLKIT=(1 2 3 4 5 6 7 8 9 10)
31ARRAY="1"
32echo ${TOOLKIT["$ARRAY"]}
33
34exit 0