break , continue , exit
break , continue , exit
例一:
#!/bin/bash
. /etc/init.d/functions
for i in `seq `;do
if [ $i -eq ];then
#continue #没有数字3
break
#exit
fi
echo $i
done
echo "ok~" 例二:
#!/bin/bash
for((i=0;i<=5;i++));do
if [ $i -eq 3 ];then
#continue
#break
exit
fi
echo $i
done
break , continue , exit的更多相关文章
- [转帖]Shell脚本中的break continue exit return
Shell脚本中的break continue exit return 转自:http://www.cnblogs.com/guosj/p/4571239.html break结束并退出循环 cont ...
- break continue exit return 的区别
[root@localhost day1]# cat ss.sh #!/bin/bash for ((i=0;i<5;i++)) do if [ $i -eq 3 ] then break #c ...
- Shell脚本中的break continue exit return
转自:http://www.cnblogs.com/guosj/p/4571239.html break结束并退出循环 continue在循环中不执行continue下面的代码,转而进入下一轮循环 e ...
- python中break continue exit() pass区别
1.break break是终止本次循环,比如你很多个while循环,你在其中一个while循环里写了一个break,满足条件,只会终止这个while里面的循环,程序会跳到上一层while循环继续往下 ...
- 特殊的流程控制语句break continue exit
break语句可以结束当前的for.foreach.while.do-while.或者switch的执行. for($i=1; $i<10; $i++) { if($i == 5) { echo ...
- C语言break/continue/exit/return的功能区别
break是跳出整个循环而执行循环体之外的下一条语句: continue只是跳出本次循环继续判断下一次循环条件是否满足. exit() 结束当前进程/当前程式/,在整个程式中,只要调用 exit ,就 ...
- (转)Shell脚本之break,continue,和exit区别
Linux脚本中的break continue exit return break结束并退出循环 continue在循环中不执行continue下面的代码,转而进入下一轮循环 exit退出脚本,常带一 ...
- delphi中exit,abort,break,continue 的区别
from:http://www.cnblogs.com/taofengli288/archive/2011/09/05/2167553.html delphi中表示跳出的有break,continue ...
- delphi中break,continue, exit,abort, halt, runerror的异同
delphi中表示跳出的有break,continue, exit,abort, halt, runerror. 1.break 强制退出循环(只能放在循环中),用于从For语句,while语句或re ...
随机推荐
- winform学习之----Directory
Directory 文件夹目录 几个方法: CreateDirectory,delete,move,getfiles,exists 操作文件:用File 操作路径:用path 操作文件夹:Direct ...
- SSH整合所需的jar包
Spring3.1+Hibernate3+Struts2的最新整合所需要的jar包 Spring的基本jar包: 1.org.springframework.web-3.1.4.RELEASE.jar ...
- SPIE Example References
Journal Article[1] Davis, A. R., Bush, C., Harvey, J. C. and Foley, M. F., "Fresnel lenses in r ...
- Programming with gtkmm 3
https://developer.gnome.org/gtkmm-tutorial/unstable/index.html.zh_CN 1. 序言 1.1. 本书 1.2. gtkmm 2. 安 ...
- Swift UICollectionView 简单使用
最近要研究下排布的游戏关卡界面的实现,简单做了个UICollectionView的demo. 先看最后的效果: 下面来看实现的方法把,在Storyboard对应的ViewController中增加一个 ...
- 【液晶模块系列基础视频】5.2.X-GUI字体驱动2
============================= 技术论坛:http://www.eeschool.org 博客地址:http://xiaomagee.cnblogs.com 官方网店:ht ...
- Angualar:指令大全
指令: 内置渲染指令 内置事件指令 内置节点指令 自定义指令 restrict template replace属性 templateUrl属性 trnsclude priorty terminal属 ...
- Ubuntu安装和设置SSH服务
1.安装 Ubuntu缺省安装了openssh-client,所以在这里就不安装了,如果你的系统没有安装的话,再用apt-get安装上即可. 安装ssh-server sudo apt-get ins ...
- Visual Studio快捷键不能使用解决办法
环境: Visual Studio 2010,windows 7 使用Visual Studio查找变量或方法时常用到[定位到]功能 但该功能的快捷键却不能使用,解决办法如下所示: 1.工具--> ...
- JAVA Exchanger
//Exchanger工具类的使用案例 //本文给出一个简单的例子,实现两个线程之间交换数据,用Exchanger来做非常简单. import java.util.concurrent.Exchang ...