shell循环字符串数组
2021-06-19 08:04
阅读:488
标签:i++ code 字符 another class 数组 done other nbsp shell循环字符串数组 标签:i++ code 字符 another class 数组 done other nbsp 原文地址:https://www.cnblogs.com/yy123/p/9690923.html
#!/bin/bash
arr=("0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "a" "b" "c" "e" "e" "f")
for value in ${arr[@]}
do
echo $value
done
# 或者采取如下方式
echo "----------------------another way----------------------"
for (( i = 0 ; i ))
do
echo ${arr[$i]}
done
评论
亲,登录后才可以留言!