linux 命令系列之 case(61)
来源:互联网 发布:淘宝怎么买武士刀 编辑:程序博客网 时间:2024/06/04 15:41
case $变量名 in
"值1"
如果变量的值等于变量1,则执行
;;
"值2"
如果变量的值等于变量2,则执行
;;
....省略其他分支....
*)
如果变量的值都不是以上的值,则执行此程序
;;
esac
eg://////////////////////////////////////////////////////////////////////////
case $cho in
"yes")
echo "yes"
;;
"no")
echo "yes"
;;
*)
echo "error"
;;
esac
"值1"
如果变量的值等于变量1,则执行
;;
"值2"
如果变量的值等于变量2,则执行
;;
....省略其他分支....
*)
如果变量的值都不是以上的值,则执行此程序
;;
esac
eg://////////////////////////////////////////////////////////////////////////
case $cho in
"yes")
echo "yes"
;;
"no")
echo "yes"
;;
*)
echo "error"
;;
esac
0 0
- linux 命令系列之 case(61)
- Linux命令之条件判断-case
- linux命令终极系列之(find)
- linux命令终极系列之(find)
- linux命令终极系列之(grep)
- linux 命令系列之ls (1)
- linux 命令系列之帮助(9)
- linux 命令系列之vim(14)
- linux 命令系列之 useradd(24)
- linux 命令系列之 passwd(25)
- linux 命令系列之 groupmod(28)
- linux 命令系列之 chattr(33)
- linux 命令系列之 sudo(34)
- linux 命令系列之 echo(40)
- linux 命令系列之 history(41)
- linux 命令系列之 环境变量(47)
- linux 命令系列之 for(62)
- Linux Shell系列教程之(十三)Shell分支语句case … esac教程
- ISO15765协议
- 【疑难解答】如何通过servlet跳转到jsp的锚点位置
- LinkedList学习笔记——有条件的筛选链表中的元素
- Windows 7环境下搭建Cocos2d-x 3.3环境并配置Android交叉编译环境
- NULL指针调用成员函数的例子
- linux 命令系列之 case(61)
- html---自定义视频播放控制台
- 第七题
- 研发管理03:技术管理/经理
- 特征选择方法之信息增益
- Java File类
- 极光推送技术原理:移动无线网络长连接
- HDU 3468 — Treasure Hunting BFS+二分匹配
- 在word中无法使用中文输入法解决方法