![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bourne Shell: if elsif question | leostar_10 | Shell Programming and Scripting | 3 | 03-09-2008 03:37 PM |
| Bourne-again shell | mrsamer | UNIX for Dummies Questions & Answers | 3 | 09-29-2006 11:42 PM |
| cd from a Bourne Shell Script - Please Help | fawqati | Shell Programming and Scripting | 10 | 05-25-2006 12:26 AM |
| bourne shell timing question | gillbates | UNIX for Dummies Questions & Answers | 7 | 02-01-2004 12:44 PM |
| Bourne Shell Script | dmhonor914 | UNIX for Dummies Questions & Answers | 2 | 12-10-2003 08:25 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
IF THEN ELIF question in BOURNE SHELL
Hi,
I get an error when executing this sample script. #!bin/sh if [ $1 = ]; then echo "you need to enter the release as the first parameter" elif [ $1 = "ALL" ]; then echo "HI how are you ABC" echo "Hi how are you XYZ" echo " hi how are you all" else echo "using the $1 as input parameter" fi i get the following error. [: arun.sh 5: FSUM6807 expression syntax error the script requires a parameter to be passed.. If no parameter is passed the script works fine and it displays the right message. and if the parameter is ALL then also it works fine...i get the above error only if the parameter is other than null or ALL.. how to resolve this...looks like there is a problem with the else statement. |
| Forum Sponsor | ||
|
|