[oracle@june ~]$ cat continue.sh
for i in a b c d e f g
do
if [ "$i" = "c" ]
then
echo xxxxxxxxxxxxxx
echo "跳过的字符为"$i
continue
fi
done
[oracle@june ~]$ sh -x ./continue.sh
+ for i in a b c d e f g
+ '[' a = c ']'
+ for i in a b c d e f g
+ '[' b = c ']'
+ for i in a b c d e f g
+ '[' c = c ']'
+ echo xxxxxxxxxxxxxx
xxxxxxxxxxxxxx
+ echo $'\314\370\271\375\265\304\327\326\267\373\316\252c'
跳过的字符为c
+ continue
+ for i in a b c d e f g
+ '[' d = c ']'
+ for i in a b c d e f g
+ '[' e = c ']'
+ for i in a b c d e f g
+ '[' f = c ']'
+ for i in a b c d e f g
+ '[' g = c ']' continue 跳过当前循环步,回到循环开始

Shell continue循环的更多相关文章

  1. shell脚本-循环选择语句

    shell脚本-循环选择语句 过程式编程语言: 顺序执行 选择执行 循环执行 注:条件中的变量,可以在执行语句中使用,不用在加上"$". if语句 根据命令的退出状态来执行命令 单 ...

  2. Shell 编程 循环语句

    本篇主要写一些shell脚本循环语句的使用. for 循环 指定次数 #!/bin/bash for ((i=1;i<=10;i++)) do echo $i done [root@localh ...

  3. Shell双重循环、图形排列及九九乘法表

    Shell双重循环.图形排列及九九乘法表 目录 Shell双重循环.图形排列及九九乘法表 一.双重循环 1. 双重循环概述 2. 双重循环结构 二.循环特殊操作 1. exit 2. break 3. ...

  4. Linux Shell系列教程之(十二)Shell until循环

    本文是Linux Shell系列教程的第(十二)篇,更多Linux Shell教程请看:Linux Shell系列教程 在上两篇文章Linux Shell系列教程之(十)Shell for循环和Lin ...

  5. shell for循环+case的脚本(监控程序状态)

    分享一个shell for循环+case的脚本(监控程序状态) 分享一个for循环+case的脚本(监控程序状态并执行相关操作) ,供大家学习参考. 复制代码代码如下: #/bin/bash set ...

  6. shell 各种循环判断

    shell支持的循环有 Shell if else Shell case esac Shell for循环 Shell while循环 Shell until循环

  7. shell脚本--循环结构

    shell的循环结构有while和for两种 for循环 #!/bin/bash #文件名:test.sh i=4 for i in 2 4 6 8 10 do echo $i done echo $ ...

  8. Linux Shell系列教程之(十一)Shell while循环

    本文是Linux Shell系列教程的第(十一)篇,更多Linux Shell教程请看:Linux Shell系列教程 在上一篇Linux Shell系列教程之(十)Shell for循环中,我们已经 ...

  9. Linux Shell系列教程之(十)Shell for循环

    本文是Linux Shell系列教程的第(十)篇,更多Linux Shell教程请看:Linux Shell系列教程 基本任何语言都有自己的循环语句,Shell当然也不例外,今天就为大家介绍下Shel ...

随机推荐

  1. css文本超出2行就隐藏并显示省略号

    之前在网上看到过这样的代码,感觉有的时候还是挺有用的,故留个笔记. display:-webkit-box; //将对象作为弹性伸缩盒子模型显示. -webkit-box-orient:vertica ...

  2. windows 编程 —— 消息与参数(定时器、初始化消息、改变大小)

    目录: 定时器 WM_TIMER 初始化消息 WM_CREATE 改变大小 WM_SIZE 定时器: 接收消息:WM_TIMER 参数wParam:wParam参数等于定时器的ID值(上述情形为1). ...

  3. Object -C NSNumber -- 笔记

    // //  main.m //  NSNumber // //  Created by facial on 24/8/15. //  Copyright (c) 2015 facial_huo. A ...

  4. Android NumberPicker默认外观的修改

    NumberPicker是Android3.0之后引入的一个控件,在以后的TimePicker和DatePicker时间控件里边都有引用,NumberPicker本身并没有提供接口给开发者修改其默认外 ...

  5. STL中的find_if函数

      上一篇文章也讲过,find()函数只能处理简单类型的内容,也就是缺省类型,如果你想用一个自定义类型的数据作为查找依据则会出错!这里将讲述另外一个函数find_if()的用法 这是find()的一个 ...

  6. java基本打印练习《我行我素购物系统》

    public class ShoppingSystem{ public static void main(String[] args){ //System.out.println("**** ...

  7. 拓扑排序 HDU1285

    这个题是个模板题,可以直接用拓扑排序的模板来做, AC代码 #include <stdio.h> #include<iostream> #include <string. ...

  8. mysql的replication(主从同步)总结

    很好的文章,对mysql的主从架构有深入理解. mysql主从同步,从master同步数据到slave慢的情况下,是不是可以改成多线程处理加快同步速度? 参考文章如下: MySQL Replicati ...

  9. CSS3 3D转换

    CSS3允许你使用3D转换来对元素进行格式化. 3D转换方法: rotateX() rotateY() 浏览器支持 属性 浏览器支持 transform           IE10和Firefox支 ...

  10. [译]一个灵活的 Trello 敏捷工作流

    [译]一个灵活的 Trello 敏捷工作流 翻译自 An Agile Trello Workflow That Keeps Tasks Flexible Getting things done 可不只 ...