title: How to remove ^[, and all of the escape sequences in a file using linux shell scripting
body: <p>We want to remove  <code>^[</code>, and all of the escape sequences. </p>
  
  <p>sed is not working and is giving us this error:</p>
  
  <pre><code>$ sed 's/^[//g' oldfile &gt; newfile; mv newfile oldfile;
  sed: -e expression #1, char 7: unterminated `s' command
  
  $ sed -i '' -e 's/^[//g' somefile
  sed: -e expression #1, char 7: unterminated `s' command
  </code></pre>