![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to compaer
HI all ,
I Have two variables with 2 value a='software' b='hardware' i have to compare these values .. how to do i dnt hav any idea.. I m a beginner .. pls help me out |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Code:
#! /bin/sh a='software' b='hardware' if [ "$a" = "$b" ] ; then echo " $a and $b are equal" else echo " $a and $b are not equal" fi ; |
||||
| Google The UNIX and Linux Forums |