天天看點

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

繼續閱讀