Linux Shell FAQ - shell 中有数组吗?

答:当然有,用
$varname[0]=value1
$varname[1]=value2
….
来定义

$echo ${varname[0]}
方式来引用

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License