title: How to format a string in bash shell?
body: <p>I am trying to format a variable in linux</p>
  
  <pre><code>str="Initial Value = 168" 
  echo "New Value=$(echo $str|  cut -d '=' -f2);"&gt;&gt;test.txt
  </code></pre>
  
  <p>I am expecting the following output</p>
  
  <pre><code>Value = 168;
  </code></pre>
  
  <p>But instead get </p>
  
  <pre><code>Value = 168 ^M;
  </code></pre>