shell-循环
shell-循环
for
# 遍历数字
for i in {0..10}; do
echo 133
done
# 遍历文件
for file in split_??????; do
echo ${file}
done
# 数组:
arr=(list0 list1 list2 list3)
# 遍历数组
for list in ${arr[@]}; do
echo ${list}
done
while
while read line; do
echo $line
done < file.txt
本站总访问量次 本站访客数人次 本文总阅读量次