title: sed command works on command line but not in bash script
body: <p>I'm trying to convert text that says "6.1M" to "6.1 MB".  Simple sed command right?</p>
  
  <p>($SIZE is already se to 6.1M)</p>
  
  <pre><code>SIZE=`echo $SIZE|sed 's/M/ MB/'`
  </code></pre>
  
  <p>This works just find on the command line.  However, when I do it as part of a bash script, I get this error:</p>
  
  <pre><code>sed: -e expression #1, char 10: unterminated `s' command
  </code></pre>
  
  <p>I've tried escaping the space character with a backslash, but that didn't help.  I also tried using this syntax, both with and without escaping the space:</p>
  
  <pre><code>SIZE=$(sed 's/M/ MB/' &lt;&lt;&lt; $SIZE)
  </code></pre>
  
  <p>Same error.  What's going on here?</p>