#!/bin/bash
#
# "ho-hum" - a text-mode menu

clear

while [ 1 ]         # Loop `forever'
do
# We're going to do some `display formatting' to lay out the text;
# a `here-document', using "cat", will do the job for us.

cat << !

            M A I N   M E N U

        1. Business auto policies
        2. Private auto policies
        3. Claims
        4. Accounting
        5. Quit

!
echo -n " Enter your choice: "

# Why have I not followed standard indenting practice here? Because
# the `here-doc' format requires the delimiter ('!') to be on a line
# by itself - and spaces or tabs count. Just consider everything as
# being set back one indent level, and it'll all make sense.

read choice

case $choice
in
    1|B|b) bizpol ;;
    2|P|p) perspol ;;
    3|C|c) claims ;;
    4|A|a) acct ;;
    5|Q|q) clear; exit ;;
    *) echo; echo "\"$choice\" is not a valid option."; sleep 2 ;;
esac

clear
done
