![]() |
|
|
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 |
| file comparison | satish.res | Shell Programming and Scripting | 7 | 10-09-2008 08:55 AM |
| need some help..Comparison | bluesilo | Shell Programming and Scripting | 0 | 02-23-2008 04:43 PM |
| Unix comparison | NewGuy100 | UNIX for Dummies Questions & Answers | 1 | 12-14-2005 04:42 PM |
| dir comparison help | ghazi | Shell Programming and Scripting | 5 | 12-20-2004 05:54 PM |
| comparison | cnf | Filesystems, Disks and Memory | 2 | 05-14-2002 02:52 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
variable comparison
Hello,
I am trying to compare two variables, which both have a word stored in it. The code I am using is. Please tell me which one of these is correct.Or please tell me the correct syntax. Thankyou if [ $variable1=$variable2 ] then if [ $($variable1)=$($variable2) ] then if [ "$variable1"="$variable2" ] then if [ "$variable1" = "$variable2" ] then if [ "$variable1" -eq "$variable2" ] then None of them seems to work for me. |
| Bookmarks |
| Tags |
| variable comparison |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|