title: How to globally replace strings in lines NOT starting with a certain pattern
body: <p>I want to globally replace the string foo with the string bar, using sed. This should only be done for lines which do NOT start with the string ##Input.</p>
  
  <p>I can't get it to work. I tried things like this but reached a point where I'm not sure if I know what I'm doing:</p>
  
  <pre><code>sed -i '/^##Input/ s/foo/bar/g' myfile
  </code></pre>
  
  <p>Please help!</p>