yes/no code example
Example 1: yes/no
read -n 1 -p "Is this a good question (y/n)? " answer
Example 2: yes/no
read -p "Is this a good question (y/n)? " answer
case ${answer:0:1} in
y|Y )
echo Yes
;;
* )
echo No
;;
esac