shell continue

shell continue

条件判断

#!/bin/bash
for (( i=0;i<=10;i++ ))
do 
  if (( i>0 && i<7 ));then
    continue
  else
    echo "Number is $i"
  fi
done

结果:
Number is 0
Number is 7
Number is 8
Number is 9
Number is 10
posted @ 2022-09-27 11:15  liwenchao1995  阅读(35)  评论(0编辑  收藏  举报