title: how do I escape ' in sed?
body: <p>I do not understand what I am doing wrong here:</p>
  
  <pre><code>$ cat fixnames.sh
  #!/bin/sh
  
  for i in *mp3
  do
      j=`echo $i | sed -e's/ /_/g'`
      j=`echo $j | sed -e's/_(...)_/_/g'`
      j=`echo $j | sed -e's/\'//g'`
      echo $j
  done
  $ ./fixnames.sh
  ./fixnames.sh: 1: Syntax error: Unterminated quoted string
  </code></pre>
  
  <p>I guess the line <code>/bin/sh</code> does not like is ...</p>
  
  <pre><code>j=`echo $j | sed -e's/\'//g'`
  </code></pre>
  
  <p>... so how am I suppose to remove <code>'</code> ? </p>