首页 > 代码库 > continue break

continue break

#!/bin/bash
for i in `seq 10`
do
    if ((i%3==0))
    then
echo !!
        continue
    fi
echo $i
done

结果:

1
2
!!
4
5
!!
7
8
!!
10

换成break结果为

1
2
!!

 

continue break