![]() |
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 |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| multiple conditions in if using && operator | codeman007 | Shell Programming and Scripting | 2 | 12-30-2008 04:59 PM |
| Perl Substition with multiple conditions | EDALBNUG | UNIX for Dummies Questions & Answers | 4 | 09-25-2008 03:15 PM |
| Multiple conditions in find or ls stmts | mavsman | UNIX for Dummies Questions & Answers | 5 | 04-01-2008 04:57 PM |
| multiple conditions in if/then | grandtheftander | UNIX for Dummies Questions & Answers | 4 | 07-21-2006 01:58 PM |
| multiple conditions in if statements | tim mauger | Shell Programming and Scripting | 3 | 04-28-2002 09:42 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
multiple if conditions
Guys, Im trying to have a script that evaluates multiple conditions :
Code:
test.sh: if [ $1 = "brazil1" ] then echo "host $1" else if [ $1 = "brazil2" ] then echo "host $1" else echo $1 not valid exit 1 fi Code:
./test.sh brazil1 Code:
./test.sh: line 12: syntax error: unexpected end of file Thanks Last edited by bashshadow1979; 04-21-2009 at 01:32 PM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|