#!/bin/bash
echo "こちらでよろしいですか? [Y/n]"
read ANSWER
case $ANSWER in
"" | "Y" | "y" | "yes" | "Yes" | "YES" ) echo "YES!!";;
* ) echo "NO!!";;
esac
More than 5 years have passed since last update.
たまに見かける[Y/n]での分岐処理のサンプル
Last updated at Posted at 2012-10-26
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme