[root@base1 mnt]# array=([1]=one [2]=two [3]=three) # 子定义数组元素的下标[
root@base1 mnt]# echo ${array[*]}
one two three
(3)
[root@base1 mnt]# array[0]=a
[root@base1 mnt]# array[1]=b
[root@base1 mnt]# array[2]=c
[root@base1 mnt]# array[3]=d
[root@base1 mnt]# echo ${array[0]}
a
[root@base1 mnt]# echo ${array[2]}
c
[root@base1 mnt]# echo ${array[*]}
a b c d