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 07-10-2009
46019 46019 is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 11
String comparison

Hi,

I have the below logic. Here 'X' is a variable having some string.


if [$X = "Today is holiday."]
then
echo "i dont need to go to ofc"
else
echo "i need to go to ofc"


Please help me to write it in unix.

Thanks.