ループforIFS=' ' for line in `cat /etc/passwd`; do echo $line done continuefor x in 1 2 3; do if [ "$x" = "2" ]; then continue fi echo $x done 1 3 ループ内処理の結果をファイルへリダイレクトするfor n in 1 2 3; do echo DEBUG: $n done >> num.txt while引数処理while [ $# -gt 0 ]; do echo $1 shift done カウントダウンtry=10 while [ "$try" -gt 0 ]; do try=`expr "$try" - 1` done breakで抜けるwhile : ; do if date '+%S' | grep '00'; then echo hit break fi echo -n . sleep 1 done |
|