linux变量数组
# mytest=(o t h f i)# echo mytest
mytest
# echo ${mytest}
h
*环境变量数组的索引值以0开始
若要显示整个数组变量,可以用*号通配符做索引值
# echo ${mytest
[*]}
o t h f i
并且还可以更改单个索引位置的值:
# mytest=seven
# echo ${mytest
[*]}
o t seven f i
甚至可以用unset命令移除数组中某个值
# unset mytest
# echo ${mytest
[*]}
o t f i
页:
[1]