read -p "Please enter the Y/N:" para
case $para in
[yY])echo"entered Y";;[nN])echo"entered N";;*)echo"Invalid input ......"
read -p "Please enter any key to exit"exitexit 1
esac # end case
read -p "Please enter any key to exit" exit_shell
Shell脚本根据键盘输入Y/N判断执行文章目录Shell脚本根据键盘输入Y/N判断执行代码代码read -p "Please enter the Y/N:" para#Debug or Releasecase $para in [yY]) echo "enter Y" ;; [nN]) echo "enter N" ;; *) echo "Invalid input ......" read -p "Please enter any key to exit"