基本语法(数组)--Linux
基本语法 数组定义 majun@instance-zqtg07w6:~$ pa pa: command not found majun@instance-zqtg07w6:~$ echo $? 127 majun@instance-zqtg07w6:~$ declare -a array majun@instance-zqtg07w6:~$ echo $array majun@instance-zqtg07w6:~$ array [ 0 ] = 111 majun@instance-zqtg07w6:~$ array [ 1 ] = 333 majun@instance-zqtg07w6:~$ array [ 2 ] = "helloworld" 数组操作 数组取值 majun@instance-zqtg07w6:~$ echo $array 111 majun@instance-zqtg07w6:~$ echo $array [ 2 ] 111 [ 2 ] majun@instance-zqtg07w6:~$ echo ${array[2]} helloworld majun@instance-zqtg07w6:~$ echo ${array[1]} 333 majun@instance-zqtg07w6:~$ echo ${array[@]} 111 333