码迷,mamicode.com
首页 > 系统相关 > 详细

Shell 模板 (Yes or NO)

时间:2018-09-07 10:59:53      阅读:530      评论:0      收藏:0      [点我收藏+]

标签:cas   inpu   case   author   style   ase   class   yar   input   

#!/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)

标签:cas   inpu   case   author   style   ase   class   yar   input   

原文地址:https://www.cnblogs.com/xyarn/p/9602601.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!