shell实现菜单选择
2013-06-07 23:31
411 查看
output="Is today your birthay: " echo -e "\n" select menu_selections in Yes No Quit do case $menu_selections in Yes) echo -e "\nHappy Birthday!\n" ;; No) echo -e "\nIt is someone's birthaday today...sorry it is not yours\n" ;; Quit)echo -e "\nLater tater!\n" break ;; *) echo -e "\nInvalid Answer...Please try again\n" ;; esac done
output变量是表示提示语,select后面跟的yes no quit可以看成一个数组,按键1选择yes,2选择no,3选择quit。达到菜单的目的。
相关文章推荐
- shell实现菜单选择的两种方法
- cocos2dx菜单重叠按钮实现按层优先选择及透明过滤
- ubuntu14.04,如何使用鼠标右键菜单在shell中打开选择项目?
- jquery实现右侧栏菜单选择操作
- 【Android】Activity和PopupWindow都实现从底部弹出或滑出选择菜单或窗口
- jquery实现右侧栏菜单选择操作
- Angalarjs之上拉菜单(ActionSheet)实现使用拍照和选择图库的方式上传头像功能
- 纯JSP+DWR实现三级联动下拉选择菜单
- 用jquery实现可以左右选择的菜单效果
- shell 实现 选择排序
- android PopupWindow实现从底部弹出或滑出选择菜单或窗口
- Android实现下拉导航选择菜单效果
- android开发之&使用ViewPager加gridView实现菜单按钮分页滑动(类似QQ表情选择翻页效果)
- android PopupWindow实现从底部弹出或滑出选择菜单或窗口
- 实现联系人列表滑动显示提示信息 以及弹出选择菜单
- shell脚本编程实现计算器功能并根据选择将其保存于文件中
- 使用shell和python分别实现简单菜单功能--打印当前系统状态信息
- 排序算法复习(Java实现):插入,冒泡,选择,Shell,快速排序, 归并排序,堆排序,桶式排序,基数排序
- Android:实现一种浮动选择菜单的效果