title: Escape characters in sed output filename
body: <p>I have a bash script in which I invoke sed to perform some manipulations on a text files contents. However I have noticed that if the filepath contains certain characters they are interpreted by sed as an instruction instead of a literal string. How can I escape these characters from the bash script?</p>
  
  <p>The part of the script in question (where $I is actually declared as an increment used inside a loop):</p>
  
  <pre><code>$I=0
  OUTPUT=folder/m_Filename"$I".h
  sed -i '1s;^;TEXT_TO_PREPEND;' "$OUTPUT"
  </code></pre>
  
  <p>which throws:</p>
  
  <pre><code>sed: 1: "{folder/m_Filename0.h}": invalid command code m
  </code></pre>
  
  <p>Running the script on OS X El Capitan.</p>