![]() |
|
|
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 |
| IF THEN ELIF question in BOURNE SHELL | arun_st | UNIX for Dummies Questions & Answers | 4 | 04-20-2007 01:41 PM |
| Bourne-again shell | mrsamer | UNIX for Dummies Questions & Answers | 3 | 09-30-2006 03:42 AM |
| bourne shell not working | gillbates | Shell Programming and Scripting | 6 | 06-17-2004 05:22 PM |
| bourne shell timing question | gillbates | UNIX for Dummies Questions & Answers | 7 | 02-01-2004 04:44 PM |
| bourne shell script | psrinivas | Shell Programming and Scripting | 2 | 12-06-2001 03:38 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Bourne Shell: if elsif question
Hi All,
Must be something obvious I am missing, but the simple script below doesn't work. #!/bin/sh x=4 if [ "$x" -eq "4" ] then echo "x is $x" elsif [ "$x" -gt "4" ] then echo "x is greater than 4" else echo "x is less than 4" fi When I run this script, I get the error message: 7: Syntax error "then" unexpected (expecting "fi") Please Help. Thanks in Advance. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|