当前位置:网站首页>Shell script if statement
Shell script if statement
2022-07-30 23:34:00 【1701y】
The structure of the if statement
Single branch structure
A corresponding fi must be connected at the end of the if statement to represent the end of the statement.
The judgment process of if single branch structure.

if conditional test operation
then command sequence
fi #Ending statement

if a=yes
ze output okok

Dual-branch structure
Judgment process of if double-branch structure

if conditional test operation
then command sequence 1
else command sequence 2
fi #Ending statement

Run it

Multi-branch structure

if conditional test operation 1
then command sequence 1
elif conditional test operation 2
then command sequence 2
else
Command sequence 3
fi


边栏推荐
- Apache Doris系列之:安装与部署详细步骤
- A detailed explanation: SRv6 Policy model, calculation and drainage
- 机器学习1一回归模型(二)
- Alibaba Cloud video on demand + project combat
- 2022 China Logistics Industry Conference and Entrepreneur Summit Forum will be held in Hangzhou!
- [0x800706D9] solution appears in Microsoft Store
- Necessary artifacts - AKShare quants
- PyTorch模型导出到ONNX文件示例(LeNet-5)
- mysql 中手动设置事务提交
- Day016 Classes and Objects
猜你喜欢
随机推荐
Day016 类和对象
2021GDCPC广东省大学生程序设计竞赛 B.Byfibonacci
How to open the payment channel interface?
Chevrolet Trailblazer, the first choice for safety and warmth for your family travel
Achievements of Science and Technology (31)
BFS题单总结
Lambda表达式
image里的mode属性
第十九周进度(了解物联网基础知识)
leetcode 406. Queue Reconstruction by Height 根据身高重建队列(中等)
Axure轮播图
"NIO Cup" 2022 Nioke Summer Multi-School Training Camp 2 H.Take the Elevator
[SAM template question] P3975 [TJOI2015] string theory
360核心安全大脑3.0正式发布,构建政企用户的“能力中枢平台”
MPI简谈
牛逼的公司都在用的绩效管理法OKR
Dry goods | 4 tips for MySQL performance optimization
uniapp develops WeChat applet - soft exam brushing applet
ZZULIOJ:1119: sequence order
Compressing Deep Graph Neural Networks via Adversarial Knowledge Distillation


![[MySQL] Mysql transaction and authority management](/img/a5/c92e0404c6a970a62595bc7a3b68cd.gif)





