# 输入标识
read -p "输入标识:" tag
# 判断
case "$tag" in
# 单个选项
1)
echo "tag = 1";;
# 多个选项
2|3)
echo "tag = 2 or tag = 3";;
# 通配符,任意内容都行
*)
echo "default";;
esac
read -p "Are you sure?[y/n]:" sure
case $sure in
y|Y|yes|YES|Yes)
echo "you enter '$sure',OK";;
n|N|no|NO|No)
echo "you enter '$sure',OVER";;
*)
echo "error";;
esac