The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-06-2007
ithirak17 ithirak17 is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 13
Wink to compare two strings

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....