1、匹配模式引用| #!/bin/bash echo -n “Do you want to continue?[Yes or No]”: read ANS case $ANS in Y|y|yes|Yes|YES) echo “YES!” ;; N|n|no|No|NO) exit 0 ;; *) echo “`basename $0`:The unexpected string” exit 1 ;; esac echo $? 2、参数传入 #!/bin/bash if [ $# != 1 ];then echo “Usage `basename $0`:[sta