shellScript之select语句
来源:互联网 发布:java生成随机数的方法 编辑:程序博客网 时间:2024/05/18 19:45
#!/bin/bashecho "what you favorite color?"select color in "red" "blue" "green" "white" "black"do breakdoneecho "you have selectd $color"
结果:
~/Note/test # ./23select.sh what you favorite color?1) red2) blue3) green4) white5) black#? 4you have selectd white
例子2:利用命令行传递参数
#!/bin/bashecho "what you favorite color?"select colordo breakdoneecho "you have selectd $color"结果:
~/Note/test # ./24select.sh red blue green white blackwhat you favorite color?1) red2) blue3) green4) white5) black#? 5you have selectd black
阅读全文
0 0
- shellScript之select语句
- shellScript之if_else语句
- shellScript之if_elif_else语句
- shellScript之case语句
- shellScript之for语句
- shellScript之while语句
- shellScript之while语句
- shellScript之util语句
- shellScript之continue语句
- shellScript之嵌套if_else语句
- shellscript之简单的if语句
- shellScript之位置参数
- shellScript之break关键字
- shellScript之hello函数
- shellScript之数组操作1
- shellScript之数组操作2
- shellScript之数组操作3
- shellScript之数组操作4
- Spring Cloud源码分析(二)Ribbon
- springMVC 整合mockito单元测试学习
- git 创建远程仓库
- Spring Cloud源码分析(二)Ribbon(续)
- mysql中int、bigint、smallint 和 tinyint的区别及应用
- shellScript之select语句
- 使用Spring StateMachine框架实现状态机
- 由联编引起的事件
- 使用画布做后台登录系统背景
- 为Spring Cloud Ribbon配置请求重试(Camden.SR2+)
- Spring Boot Actuator监控端点小结
- 《数据库技术原理与应用教程》一第一篇 基础篇
- JS辨别访问浏览器判断是android还是ios系统
- Spring Boot应用的后台运行配置