安装服务脚本例子之打印菜单
#!/bin/bash mem(){ cat <<END 1.[ install nginx] 2.[ install mysql] 3.[ install php] 4.[ install Linux] END } mem read -p "Please input num:" num echo "you have se $num" [ $num -eq 1 ] && { echo "starting install nginx." /bin/sh /tmp/test/a.sh ##这里调用安装服务脚本 }