case条件判断
#!/bin/bash
read -p "do you agree " INPUT
case $INPUT in
[Yy]|[Yy][Ee][Ss])
echo "you input yes"
;;
[Nn]|[Nn][Oo])
echo "you input no"
;;
*)
echo "input error,please input yes or no"
esac
case条件判断
#!/bin/bash
read -p "do you agree " INPUT
case $INPUT in
[Yy]|[Yy][Ee][Ss])
echo "you input yes"
;;
[Nn]|[Nn][Oo])
echo "you input no"
;;
*)
echo "input error,please input yes or no"
esac