1.
echo -n "Is it morning? Please input yes or no: "
read yesorno
case "$yesorno" in
[yY]*) echo "Good Morning";;
[nN]*) echo "Good afternoon";;
*)
echo "Sorry"
exit 1;;
esac
exit 0
2.
#!/bin/bash
echo "Today is Sunday|saturday? (yes|no)"
read today
case "$today" in
[yY][eE][sS]) echo "happy weekend!";;
[nN]*) echo "work harder!";;
*) echo "input error!";;
esac
3.