シェルスクリプト
基本 [#vcc3593a]
#!/bin/bash
case $1 in
1|2|3 ) echo "1-3" ;;
[4-6] ) echo "4-6" ;;
esac
yes/no分岐 [#oac1bef3]
echo "Is this OK? [y/n]:"
read CNFM
case $CNFM in
y ) echo "Correct" ;;
n ) echo "Sorry, incorrect. end.";exit ;;
esac