![]() |
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 |
| Compare two arrays in sh or compare two fields | rijeshpp | Shell Programming and Scripting | 0 | 10-31-2007 02:47 AM |
| Put strings around the file name | Jolly | UNIX for Advanced & Expert Users | 3 | 05-09-2007 07:32 AM |
| How to concatenate two strings or several strings into one string in B-shell? | fontana | Shell Programming and Scripting | 2 | 08-26-2005 11:58 AM |
| ksh - strings | itzcoolbuddy | Shell Programming and Scripting | 1 | 06-22-2005 10:26 AM |
| splitting strings | bensky | UNIX for Dummies Questions & Answers | 3 | 02-11-2004 01:59 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
hi all,
i am new to unix. Actually i need to compare two string and print the result... suppose type='sun' if[$type = 'sun' ]; then echo good morning else echo good night fi whether the comparison is right r we need to use eq???? help me please.... thanks in advance.... |
|
||||
|
= is used for string comparison.
eq is used for arithmetic comparison. what you are doing is right |
| Sponsored Links | ||
|
|