shell-case
来源:互联网 发布:软件方案模板 编辑:程序博客网 时间:2024/05/17 19:16
#!/bin/shecho "Is it morning? Please answer yes or no"read timeofdaycase "$timeofday" inyes) echo "Good Morning";;no) echo "Good Afternoon";;y) echo "you input y, Good Morning";;n) echo "you input n, Good Afternoon";;*) echo "Sorry, answer not reconginzed";;esacexit 0
TEST:
$ chmod +x case_usage.sh$ case_usage.sh
case_usage.sh: command not found #forget the ./
$ ./case_usage.sh
Is it morning? Please answer yes or no
x
Sorry, answer not reconginzed
$ ./case_usage.sh
Is it morning? Please answer yes or no
n
you input n, Good Afternoon
0 0
- shell case
- shell-case
- shell case...esac
- shell语法之case
- Unix Shell - Case statement
- shell变成--case语句
- shell编程 case语句
- shell之case
- 【shell】case 语句
- shell case syntax
- shell 调用函数 case
- shell-006: case
- shell语法之case
- linux shell-----case statement
- shell中case
- shell的case语句
- shell语法case
- shell的case语句
- HashMap,LinkedHashMap,TreeMap的区别
- Excel vba 求助。
- tiny4412 裸机程序 三、关闭看门狗和调用C程序
- STL常用知识
- Linux内核通用链表 <linux/list.h>阅读
- shell-case
- home键无反应分析处理(资料搜集)
- 四色电视:大趋势与微革命
- Unable to instantiate default tuplizer/Could not find a getter for orders in class
- Android下使用lamemp3库将PCM录音数据压缩为MP3格式
- 《李逵探母》_0
- js实现表格的选中一行-------Day58
- 泊松分布
- jquery获取选中的文本和值