![]() |
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 |
| Simple Script | mojoman | Shell Programming and Scripting | 6 | 05-12-2008 03:55 AM |
| simple script | ali560045 | Shell Programming and Scripting | 1 | 01-22-2008 04:41 AM |
| Simple Script Help | Skunkie | UNIX for Dummies Questions & Answers | 4 | 10-02-2006 11:18 AM |
| simple awk script... | moxxx68 | Shell Programming and Scripting | 3 | 01-24-2005 04:17 AM |
| simple script | hedrict | UNIX for Dummies Questions & Answers | 4 | 02-23-2004 04:15 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Simple Script
Here is the script that i am trying to run. I get an error and i can't figure out what is the problem.
#!/bin/bash echo "What is your name" read NAME if [ $NAME -eq $Eugene ]; then echo "My name is the same" esle echo "You have a nice name" fi |
|
||||
|
Quote:
Whats u r error ?? R u declare the $Eugene value ? |
|
||||
|
Quote:
The code is correct except that you have not declared the "Eugene" variable. Hence its not able to compare the to variables so it might be throwing the error. please use the below code: #!/bin/bash echo "What is your name" read NAME Eugene=Vicky if [ $NAME -eq $Eugene ]; then echo "My name is the same" else echo "You have a nice name" fi probably this would work. Please post the error if any.... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|