shell 數組遍歷的3種方法

shell數組的基本知識請參閱個人上一篇博客shell 數組 首先建立一個數組 array=( A B C D 1 2 3 4)shell 1.標準的for循環 for(( i=0;i<${#array[@]};i++)) do #${#array[@]}獲取數組長度用於循環 echo ${array[i]}; done;數組   2.for … in 遍歷(不帶數組下標):.net for el
相關文章
相關標籤/搜索