当前位置:网站首页>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


边栏推荐
猜你喜欢
随机推荐
ZZULIOJ:1120: 最值交换
软考学习计划
软件测试三阶段,你在哪一步?
“蔚来杯“2022牛客暑期多校训练营4 L.Black Hole 垃圾计算几何
IJCAI2022教程 | 口语语言理解:最新进展和新领域
如何在 AWS 中应用 DevOps 方法?
C# VSCode & Rider引用命名空间快捷键
WebServer流程讲解(注册模块)
微软商店出现【0x800706D9】解决方法
[0x800706D9] solution appears in Microsoft Store
Chevrolet Trailblazer, the first choice for safety and warmth for your family travel
天空云变化案例
[动态规划] 0-1背包问题和完全背包问题
leetcode 406. Queue Reconstruction by Height 根据身高重建队列(中等)
Data cleaning - ingest using es
leetcode(刷题篇13)
HCIP第十五天笔记
Summary of BFS questions
Reverse linked list - in-place inversion method
Android安全性优化——APP加固









