The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 05-20-2006
Vikas Sood Vikas Sood is offline
Registered User
  
 

Join Date: May 2006
Posts: 32
may be i was not clear

excuse me if i did not clearly stated the prob. Consider this piece of code:

if( $3 == "R001" )
print "xxx";
else
print "yyy";
fi

my question is why can't I use the following instead of above:

if [[ $3 = "R001" ]]
print "xxx"
else
print "yyy"
fi

Also, is there is a difference in () and [[ ]] in above two examples?

Thanks