当前位置:网站首页>24、shell编程-流程控制
24、shell编程-流程控制
2022-08-04 15:08:00 【51CTO】
条件选择
if语句
if判断条件是否满足,如果满足,则执行命令1,不满足执行条件2
格式 if commands; then commands;[elif commands;then commands;]...[else commands;] fi
单分支
双分支
多
case语句
case判断为多种条件匹配作为选择,如选择1 执行command1 选择2 执行command2
格式 case word in [pattern [|pattern]...) commands ;;]...esac
pattern支持通配符 * 任意长度任意字符 ?任意单个字符 []指定范围内任意单个字符 | 或 a|b代表a或者b
边栏推荐
- AOSP built-in APP franchise rights white list
- C# SolidWorks二次开发---工程图简单版标注孔信息
- 365天挑战LeetCode1000题——Day 049 非递增顺序的最小子序列 贪心
- Win10无法访问移动硬盘怎么解决
- 特殊品种的二次开户验资金额
- QT笔记——Q_INVOKABLE了解
- 手搓一个“七夕限定”,用3D Engine 5分钟实现烟花绽放效果
- OAID是什么
- JCMsuite应用:倾斜平面波传播透过光阑的传输
- [in-depth study of 4 g / 5 g / 6 g project - 50] : URLLC - 16 - the 3 GPP URLLC agreement, specification, technical principle of depth interpretation - 10 - high reliability technology - 1 - low codin
猜你喜欢
郑轻新生校赛和中工选拔赛题解
leetcode:215无序数组中找第k大的元素
实际工作中的高级技术(训练加速、推理加速、深度学习自适应、对抗神经网络)
【北亚数据恢复】IBM System Storage存储lvm信息丢失,卷访问不了的数据恢复方案
程序猿七夕礼物-如何30分钟给女朋友快速搭建专属语聊房
【 HMS core 】 【 Media 】 online video editing service 】 【 material can't show, or network anomalies have been Loading state
Hangzhou Electric School Competition (Counter Attack Index)
1401 - Web technology 】 【 introduction to graphical Canvas
微软表示将向内部网络安全专家共享数据 为企业提供更安全保护
【Web技术】1401- 图解 Canvas 入门
随机推荐
Sum of four squares, laser bombs
【历史上的今天】8 月 4 日:第一位图灵奖女性得主;NVIDIA 收购 MediaQ;首届网络安全挑战大赛完成
什么,你告诉我?作用域也分种类?
leetcode:255 验证前序遍历序列二叉搜索树
Makefile syntax and usage notes
leetcode: 251. Expanding 2D Vectors
技术分享| 融合调度系统中的电子围栏功能说明
leetcode: 212. Word Search II
G. Mountaineering Squad (violence & dfs)
我爱七夕哈哈哈
企业级优化
Hangzhou Electric School Competition (Counter Attack Index)
明明加了唯一索引,为什么还是产生重复数据?
用了TCP协议,就一定不会丢包吗?
Bluetooth Technology|In the first half of the year, 1.3 million charging piles were added nationwide, and Bluetooth charging piles will become the mainstream of the market
Go 语言快速入门指南: 变量和常量
基本介绍PLSQL
手搓一个“七夕限定”,用3D Engine 5分钟实现烟花绽放效果
属于程序猿的浪漫
编译型与解释型编程语言的区别