Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google site




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 10-30-2002
workingstiff workingstiff is offline
Registered User
 

Join Date: Oct 2002
Posts: 3
for the menu to keep popping up after you choose a menu item and it executes you can do the following :-
Just after your comments in the beginning of your scripts ( I'm presuming that you are using a case statement to write your menu)
eg.

Code:
while true
do
clear

# The following is displayed as a menu on the user's screen

echo "                    Administrator's Menu
                          ====================
                1)  View backup status
     Enter your Choice ==> \c"

read CHOICE DUMMY

# This section executes the user's choice of commands from the above menu

case "$CHOICE" in

# This command shows the last ten lines of the backup log to allow
# the Administrator to view the status of the backups over the last
# few days

        1 )  tail -10 /usr/scripts/backup.log |pg
            ;;
esac
done

In other words the while true do....done will do it for you

added code tags --oombera

Last edited by oombera; 02-17-2004 at 02:54 PM..