- 论坛徽章:
- 2
|
大家好, 脚本大概是这样 , 现在有一个问题如下 , 我通过菜单选择1 到了二级目录 ,然后我在选择3 直接结束程序了, 而不是回到一级菜单。请帮忙解决!
declare flag=0
menu_input(){
cat <<EOF
echo "----------------------------------"
echo "please enter your choise 0-1)"
echo " (1) Configure apache Service"
echo " (0) Exit Menu"
echo "----------------------------------"
EOF
}
menu_input
read -p "please enter your choice[0-1]:" input
case $input in 1)
clear
while [ "$flag" -eq 0 ]
do
cat << EOF
(1) Start $SERVER1 Service
(2) Stop $SERVER1 Service
(3) Back
EOF
read -p "please enter your choice[0-3]:" input1
1)
echo -e "\n>>>>>>>>>>>DATE is 1
;;
2)
echo "Stop $SERVER1.................................................
......[OK] sleep 2
clear
;;
3)
clear
break
;;
*)
ququququ
;;
esac
done
esac
|
|