| sep96.tar |
Listing 1: Menu utility
1 #MENU 2 clear 3 echo "\n SELECTION \t DESCRIPTION " 4 echo " =========== \t =========================================== " 5 echo " 1 :\c" 6 echo "\t PRINT CURRENT CLIENT COUNT" 7 echo " 2 :\c" 8 echo "\t REMOVE INFORMATION FOR A CLIENT" 9 echo " 3 :\c" 10 echo "\t FIX A CLIENT THAT CANNOT BE DELETED" 11 echo " 4 :\c" 12 echo "\t UNLOCK A HUNG TERMINAL" 13 echo "\t\t\n\n\n " 14 echo "\n ENTER 1 - 4 (Q to Quit): \c" 15 read num 16 tr "[a-z]" "[A-Z]" 17 echo `date` "- " $num >> /usr/acct/maint/help.log 18 case $num in 19 1) 20 pr -l58 -f -h " Current Client Count" /usr/acct/data/ead| LPR -b 21 ;; 22 2) 23 clear 24 echo "\n\n Enter Client Number: " 25 read ead 26 echo "\n\n Is $ead correct? (y to continue)" 27 read y 28 if [ $y = "Y" ] || [ $y = "y" ] 29 then 30 cd /usr/acct/data 31 select from cd where key = "%ld$ead" > temp.tmp 32 remove from cd records in temp.tmp 33 cd /usr/acct/maint 34 else 35 echo "\n\n Deletion cancelled!!" 36 fi 37 sleep 7 38 ;; 39 3) 40 clear 41 echo "\n\n Enter Client Number: " 42 read ead 43 cd /usr/acct/data 44 /usr/acct/clearbusy $ead 45 cd /usr/acct/maint 46 echo "\n\n Finished!\n You should be able to delete client now!" 47 sleep 7 48 ;; 49 4) 50 clear 51 echo "\n\n Enter the System Number (1 - 4) :" 52 read whr 53 case $whr in 54 1|2|3|4) rlogin $site$whr -l killer 55 ;; 56 *) echo "\n ******INVALID CHOICE*****" 57 sleep 7 58 ;; 59 esac 60 61 Q) 62 echo "\n\n\n\t\t\tRETURNING TO LOGIN !!!" 63 exit 64 exit 65 ;; 66 # H) 67 # echo "Help Text will go here!" 68 # sleep 3 69 # ;; 70 *) 71 echo "\n\t***** INVALID CHOICE ! *****" 72 sleep 3 73 ;; 74 esac 75 MENU # End of File
|