title: Compare a string using sh shell
body: <p>I am using SH shell and I am trying to compare a string with a variable's value but the <code>if</code> condition is always execute to true. Why?</p>
  
  <p>Here is some code:</p>
  
  <pre><code>Sourcesystem="ABC"
  
  if [ "$Sourcesystem" -eq 'XYZ' ]; then 
      echo "Sourcesystem Matched" 
  else
      echo "Sourcesystem is NOT Matched $Sourcesystem"  
  fi;
  
  echo Sourcesystem Value is  $Sourcesystem ;
  </code></pre>
  
  <p>Even this is not working:</p>
  
  <pre><code>Sourcesystem="ABC"
  
  if [ 'XYZ' -eq "$Sourcesystem" ]; then 
      echo "Sourcesystem Matched" 
  else
      echo "Sourcesystem is NOT Matched $Sourcesystem"  
  fi;
  
  echo Sourcesystem Value is  $Sourcesystem ;
  </code></pre>
  
  <p>Secondly, can we match this with a NULL or empty string?</p>