![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help needed in using case statement | jisha | Shell Programming and Scripting | 0 | 01-16-2008 12:33 AM |
| what is problem with this small shell script.. case statement related | johnray31 | Shell Programming and Scripting | 2 | 12-10-2007 11:05 AM |
| case statement | bkan77 | Shell Programming and Scripting | 5 | 09-11-2007 02:54 PM |
| Case Statement | Zeta_Acosta | Shell Programming and Scripting | 19 | 04-06-2004 01:16 PM |
| case statement | Bab00shka | Shell Programming and Scripting | 1 | 07-15-2002 02:31 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Case statement problem
I need to display this menu and accept variables. Can someone tell me why i am having a problem with this case statement, please
# TAPE MANAGER MAIN MENU tapemgr_Main_Menu() { echo "Legato Tape Management System Menu" echo " This system is used to report Legato ERV Offsite and Tapes Returned" echo " 1. BUR IPS Tape Offsite Report" echo " 2. BUR IPS TAPE Returns from ERV" echo " q. Quit or Ctrl-C" echo "Select an option 1,2,q"; read $1 case $1 in 1) Tapes_Offsite_Menu() ;; 2) Tapes_Return_Menu() ;; q) exit ;; } Tapes_Offsite_Menu() { echo "1. Weekly or Monthly or Both Offsite Reporting (w,m,b)" echo " (W)Weekly (M) for Monthly or (B) for Both x-exit" read SEL case $SEL in w) Weekly_Offsite();; m) Monthly_Offsite();; b) Both_Offsite();; x) tapemgr_Main_Menu();; esac } Tapes_Return_Menu() { echo "Tapes Return Menu" echo " 1. Enter IPS tape (V)olumes or (D)ates to be returned" echo " r) Return to Main Menu" case $SEL in V) Volume_Returns();; D) Volume_Date_Returns();; r) tapemgr_Main_menu();; esac |
| Forum Sponsor | ||
|
|
|
|||
|
I am assuming the user is inputing one of the menu options from the menu screen displayed within the case statement.
# TAPE MANAGER MAIN MENU tapemgr_Main_Menu() { echo "Legato Tape Management System Menu" echo " This system is used to report Legato ERV Offsite and Tapes Returned" echo " 1. BUR IPS Tape Offsite Report" echo " 2. BUR IPS TAPE Returns from ERV" echo " q. Quit or Ctrl-C" echo "Select an option 1,2,q"; read $1 case $1 in 1) Tapes_Offsite_Menu() ;; 2) Tapes_Return_Menu() ;; q) exit ;; } Tapes_Offsite_Menu() { echo "1. Weekly or Monthly or Both Offsite Reporting (w,m,b)" echo " (W)Weekly (M) for Monthly or (B) for Both x-exit" read SEL case $SEL in w) Weekly_Offsite();; m) Monthly_Offsite();; b) Both_Offsite();; x) tapemgr_Main_Menu();; esac } Tapes_Return_Menu() { echo "Tapes Return Menu" echo " 1. Enter IPS tape (V)olumes or (D)ates to be returned" echo " r) Return to Main Menu" case $SEL in V) Volume_Returns();; D) Volume_Date_Returns();; r) tapemgr_Main_menu();; esac |
|
|||
|
Quote:
|
| Thread Tools | |
| Display Modes | |
|
|