流程控制
if-then
if 条件; then
动作
fi
if-then-else
if 条件; then
动作1
else
动作2
fi
if 条件1; then
动作1
elif 条件2; then
动作2
else
动作3
fi
for
for 变量 in 列举
do
命令
done
while
while 条件
do
命令
done
until
until 条件
do
命令
done
break continue
break跳出当前循环,continue提前进入下一次循环
本文转自 justiceplus 51CTO博客,原文链接:http://blog.51cto.com/johnwang/326073,如需转载请自行联系原作者