shell之判断语句结构
来源:互联网 发布:c语言经典实例 编辑:程序博客网 时间:2024/06/05 05:08
在shell中流程控制分为两类:一类是循环,一类是判断选择。
1、if判断结构
if expression;then
command
fi
2、if/else判断结构
if expression;then
command
else
command
fi
3、if/elif/else
if expression;then
command
else
if expression;then
command
else
comamnd
fi
fi
另外一种简洁写法
if expression;then
command
elif expression;then
command
elif expression;then
command。。。。。。
fi
4、case判断结构
case var in
var1)command;
var2)command;
var3)command;
.。。。。。。
*)command;
esac
阅读全文
0 0
- shell之判断语句结构
- 【shell】结构控制-判断语句
- 一天一条shell知识------shell的结构之判断语句if-then
- shell之循环语句结构
- shell if语句之判断参数
- shell之条件测试和判断语句
- shell编程之循环与判断语句
- shell if 判断语句
- shell 判断语句
- Shell IF判断语句
- shell 判断语句
- shell 判断语句
- shell常用判断语句
- shell 判断语句
- shell if 判断语句
- Shell 判断语句
- shell控制结构语句
- shell的判断结构
- 关于h5的所有标签
- 响应式布局
- 浅谈:html5和html的区别
- HDU
- 负margin技术的应用
- shell之判断语句结构
- ACM 2037 今年暑假不AC
- 转载:虚函数和虚继承的内存分布
- 也许我可以代表90后迷茫又堕落的那些大学生
- vs2017中报无法打开包括文件: corecrt.h: No such file or directory
- PAT (Basic Level) Practise (中文) 1032. 挖掘机技术哪家强(20)
- Code::Blocks +mingw64 编译64位程序配置方法
- 数据库基本概念
- 深入理解 Java 垃圾回收机制