#!/bin/sh banner() { echo "Use one of the following options:" echo " d: To display today's date and present time" echo " l: To see the listing of files in your present working directory" echo " w: To see who's logged in" echo " q: To quit this program" echo "Enter your option and hit :" } quit() { exit 0 } list() { ls } print_date() { date } logged_in() { who } menu() { read option case "$option" in d) print_date ;; l) list ;; w) logged_in ;; q) quit ;; esac } main() { while true; do banner menu done quit } main