continue  ループ  抜ける 次の繰り返しへ


continue  構文   】
continue [n]

【continue 説明   】
for,select,until,whileを用いた

ループ構造の途中で,

囲まれたループを抜けて

次の繰り返しをする。

 

【 使用例   】

for num in `ls -la`
do

  if [ $num = '.' ]
    then
     echo "$num continue next"
     continue
    fi
      echo roop
done







       continue [n]
              Resume the next iteration of the enclosing for,  while,  until,  or
              select  loop.  If n is specified, resume at the nth enclosing loop.
              n must be ? 1.  If n is greater than the number of enclosing loops,
              the  last  enclosing loop (the ''top-level'' loop) is resumed.  The
              return value is 0 unless the shell is not  executing  a  loop  when
              continue is executed.

サーバ運用(ランキング)


blogram投票ボタン




サーバ構築(ランキング)を見る。



トラックバック(0)

このブログ記事を参照しているブログ一覧: continue  ループ  抜ける 次の繰り返しへ

このブログ記事に対するトラックバックURL: http://websky21.com/MT/mt-tb.cgi/877