title: Sed insert before first match
body: <p>I want to insert a string in html before the first "&#60;p" in the file, however I am having some difficulty.</p>
  
  <pre><code>thestring="&lt;p&gt;this is some sentence&lt;/p&gt;"
  sed -i "/&lt;p/i${thestring}" somefile.html
  </code></pre>
  
  <p>"somefile.html" however contains multiple lines containing "&#60;p" and the above inserts the string multiple times.</p>
  
  <p>I have tried doing this:</p>
  
  <pre><code>sed -i "0,/&lt;p/i${thestring}" somefile.html
  </code></pre>
  
  <p>or</p>
  
  <pre><code>sed -i "0,/&lt;p/s//i${thestring}" somefile.html
  </code></pre>
  
  <p>but I'm getting no where.</p>
  
  <p>What am I doing wrong?</p>