projects
/
external
/
bash.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Upload Tizen:Base source
[external/bash.git]
/
tests
/
array5.sub
1
2
: ${TMPDIR:=/tmp}
3
4
mkdir $TMPDIR/bash-test-$$
5
cd $TMPDIR/bash-test-$$
6
7
trap "cd / ; rm -rf $TMPDIR/bash-test-$$" 0 1 2 3 6 15
8
9
touch '[3]=abcde'
10
11
touch r s t u v
12
13
declare -a x=(*)
14
15
echo ${x[3]}
16
echo ${x[@]}
17
18
unset x
19
x=(a b c d e)
20
21
echo ${x[*]: -1}
22
23
unset x[4]
24
unset x[2]
25
26
x[9]='9'
27
28
echo ${x[*]: -1}
29
30
TOOLKIT=(1 2 3 4 5 6 7 8 9 10)
31
ARRAY="1"
32
echo ${TOOLKIT["$ARRAY"]}
33
34
exit 0