• - for var in ${arr[@]}
  • do
  • xxx=$var
  • done
  • echo ${xxx[@]}
  • 复制代码

这个xxx如何赋值 ,
类似php里面 xxx[] 的方法有吗?

因为这个外面还有一层循环,不太好用 i+1 的方式