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
!!

 

posted on 2014-12-03 11:16  寒星12345678999  阅读(129)  评论(0编辑  收藏  举报