![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 !! |
More UNIX and Linux Forum Topics 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 07:37 PM |
| Bourne-again shell | mrsamer | UNIX for Dummies Questions & Answers | 3 | 09-30-2006 02:42 AM |
| cd from a Bourne Shell Script - Please Help | fawqati | Shell Programming and Scripting | 10 | 05-25-2006 03:26 AM |
| bourne shell timing question | gillbates | UNIX for Dummies Questions & Answers | 7 | 02-01-2004 04:44 PM |
| Bourne Shell Script | dmhonor914 | UNIX for Dummies Questions & Answers | 2 | 12-10-2003 12:25 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate 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. |
|
||||
|
It worked
Hi
I tried ur suggetion and it worked. Thanks a lot |
| Sponsored Links | ||
|
|