• Shell continue循环


    [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 $'314370271375265304327326267373316252c'
    跳过的字符为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 跳过当前循环步,回到循环开始

  • 相关阅读:
    防抖函数
    video.js汉化
    vscode 设置
    webpack配置
    寄生组合继承
    数组排序
    操作节点的方法
    vscde软件
    vue目录详解
    前端
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/3797999.html
Copyright © 2020-2023  润新知