码迷,mamicode.com
首页 > 其他好文 > 详细

continue break

时间:2014-12-03 12:05:26      阅读:108      评论:0      收藏:0      [点我收藏+]

标签:style   color   sp   for   on   bs   as   nbsp   br   

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

标签:style   color   sp   for   on   bs   as   nbsp   br   

原文地址:http://www.cnblogs.com/hanxing/p/4139513.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!