for循环
1. for 变量 in 值
do
XXXXXX
done
2.for ((i=0;i<10;i++ ))
XXXXX
while 循环
while [条件]
计算用let “sum = i + 1"
shell(2)
原文:https://www.cnblogs.com/owenguo/p/15034203.html