shell数组基本操作:

  • 如下图
    shell数组基本操作
    a=(1 2 3 4 5 6) //create an array
    echo ${a[0]} //查看数组a中下标为0的元素
    echo ${a[*]} //显示数组的所有元素

相关文章: