Shell 模板 (Yes or NO)

#!/bin/bash
#Judge Yes or No!
#Author yarn
#Date 2018-9-7 09:07:14
########################
read -p "Please input Yes or No:" anw
case $anw in
[Yy][Ee][Ss]|[yY])
echo yes!
;;
[Nn][Oo]|[Nn])
echo no!
;;
esac
原文地址:https://www.cnblogs.com/xyarn/p/9602601.html