Shell 模板 (Yes or NO)

Posted xyarn

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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

 

以上是关于Shell 模板 (Yes or NO)的主要内容,如果未能解决你的问题,请参考以下文章