![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script needed to select and delete lower case and mixed case records | abhilash mn | Shell Programming and Scripting | 1 | 03-17-2008 05:00 AM |
| To CASE or not to CASE, this is my question! | olimiles | Shell Programming and Scripting | 1 | 08-19-2006 01:54 AM |
| Ignore case sensitive in Case Switch | annelisa | Shell Programming and Scripting | 1 | 07-13-2006 01:36 AM |
| options | terms5 | UNIX for Dummies Questions & Answers | 1 | 01-26-2006 10:50 PM |
| lower case to upper case string conversion in shell script | dchalavadi | UNIX for Dummies Questions & Answers | 3 | 05-28-2002 09:07 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
stacking case options
possible to stack case commands ? I get an error, s. comments below
select choice in search delete quit do case $choice in search) select option in title director year do case $option in title) ..... break ;; director) ..... break ;; year) ...... break ;; quit) exit ;; esac done # program works up to here # if I choose any of the options below I get an error message "syntax error near unexpected token ')' 'delete)' delete) ..... break ;; quit) exit ;; esac done |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Yes, is is possible to nest case statements. You have a syntax error because you have missed the closing ";;" after the first "done".
|
|
#3
|
|||
|
|||
|
you mean
quit) exit ;; esac done ;; # here ?!? # program works up to here # if I choose any of the options below I get an error message "syntax error near unexpected token ')' 'delete)' delete) |
|||
| Google The UNIX and Linux Forums |