title: Shell script strings
body: <p>I actually grep for a line from a file and store that line as a string.
  When I compare that string with a similar string (which is exactly same as other), I'm not getting the result as both of them being equal. </p>
  
  <p>Please help.</p>
  
  <pre><code>#!/bin/bash
  
  ref="BIP1295I: Integration node 'IB10NODEQ03' is an active multi-instance or High Availability integration node that is running on queue manager 'IB10QMGRQ03'."
  
  message1=$(mqsilist| grep IB10NODEQ03 2&gt;&amp;1)
  
  echo $message1
  echo $ref
  
  if [ "$message1" = "$ref" ]; then
  echo "equal"
  else
  echo "not equal"
  fi
  </code></pre>
  
  <h2>EXECUTING THE SCRIPT</h2>
  
  <pre><code>[mqbrkrs@dclqsa80 /tmp]$ sh script*
  BIP1295I: Integration node 'IB10NODEQ03' is an active multi-instance or High Availability integration node that is running on queue manager 'IB10QMGRQ03'.
  BIP1295I: Integration node 'IB10NODEQ03' is an active multi-instance or High Availability integration node that is running on queue manager 'IB10QMGRQ03'.
  not equal
  </code></pre>