1 Star 0 Fork 2

冠王团队 / shell脚本学习

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
menu.sh 512 Bytes
一键复制 编辑 原始数据 按行查看 历史
yunweinote@126.com 提交于 2019-10-15 09:32 . 添加菜单脚本menu.sh
#!/bin/bash
# liwl@nsccwx
# 菜单脚本
#
function firstFunc(){
echo "This is the first function."
}
function secondeFunc(){
echo
}
function thirdFunc(){
echo
}
function show(){
echo "
---------------------------
'1': 执行函数1
'2': 执行函数2
'3': 执行函数3
'q': 退出
---------------------------
"
}
function menu(){
while true
do
show
read -p "输入你的选项:" OPT
case ${OPT} in
1)
firstFunc;;
2)
secondeFunc;;
3)
thirdFunc;;
q)
exit 0;;
*)
;;
esac
done
}
menu
Shell
1
https://gitee.com/guznwang/shell_scripting_learning.git
git@gitee.com:guznwang/shell_scripting_learning.git
guznwang
shell_scripting_learning
shell脚本学习
master

搜索帮助