那些年写过的shell----select的使用
来源:互联网 发布:手机蟑螂魔术软件 编辑:程序博客网 时间:2024/05/22 16:52
#! /bin/bash
################################################
##Author: freeking
##Created: Oct 27th 2013
##Description the useage of select and PS3
################################################
PS3="select a day(1=4):"
select i in mon tue wed exit
do
case $i in
mon) echo "Monday";;
tue) echo "Tuesday";;
wed) echo "Wedneaday";;
exit) exit;
esac
################################################
##Author: freeking
##Created: Oct 27th 2013
##Description the useage of select and PS3
################################################
PS3="select a day(1=4):"
select i in mon tue wed exit
do
case $i in
mon) echo "Monday";;
tue) echo "Tuesday";;
wed) echo "Wedneaday";;
exit) exit;
esac
done
PS3="select a day(1=4):"做为脚本的提示符。
PS1:系统提示符($,#,\)
PS2: 系统换行提示符(->)
PS4: 用户自定义提示符,
export PS4='$0.$LINENO+ '
出处:http://linux.101hacks.com/linux-prompts
- 那些年写过的shell----select的使用
- 那些年写过的shell------模式匹配
- 那些年写过的shell-----内置变量
- 那些年写过的shell-----判断用户变量
- 那些年写过的shell-----The useage of until
- 那些年写过的shell---The useage of while
- 那些年写过的shell---the function of debug
- 那些年写过的shell---- build in command
- 那些年写过的shell-----getopts实现菜单效果
- 那些年,写过的代码
- 那些年写过的C语言
- 那些年我写过的代码
- 那些年写过的贪吃蛇
- 那些年写过的有趣注释
- 那些年我们写过的爬虫
- 那些年写过的选择器
- 那些年写过的shell-----------查找当前目录及子目录下>60K的目录
- 那些年写过的shell-----enable the color of echo
- 查看系统登陆记录
- Linux core文件详解
- [gcc编程] socket编程——TCP/UDP数据传输
- 如何获得高质量的网站外链
- JS实现页面弹出类似QQ新闻的提示框
- 那些年写过的shell----select的使用
- 什么是SAP的统驭科目
- 5.7 fgets/fputs和gets/puts-流的单行读写
- 今夜,你们是最璀璨的球星
- SEO基本概念之交叉链接
- Java修饰符总结
- gdb常用命令的用法
- 禹城玉溪1383751562002
- 各种思考和总结 2013-11-06