title: Unable to compare date variable in unix
body: <p>*<em>I am having issue *</em></p>
  
  <p><strong>while comparing date variable in if clause, because i am getting one date variable value is "$'2014-04-19\r'"  and another one is 2014-04-19.</strong></p>
  
  <p>how i come to know the value of variable is this </p>
  
  <p>by set -x property in my shell script</p>
  
  <p>value of variable  in if condition has shown me in command line is below  -</p>
  
  <p><i>+ [ $'2014-04-19\r' == 2014-04-19 ]</i></p>
  
  <p>so how can i compare because in simple text format both variable looks same, and i want to be true that condition.
  can we remove $' and \r' from that variable...</p>