天天看点

continue

continue

名称:退出for,while,until的本次循环,继续下一次循环

总揽: continue [N]

描述:

    若指定参数N,则退出N层循环

退出值:0或N

实例:

    declare -i i=0

    while [ $i -le 10 ];do

if [ $i -eq 5 ];then

i=$i+1;continue 

        fi

echo $i

i=$i+1

    done

参见: for  while until break

继续阅读