title: sed replace in file until pattern match
body: <p>I use <code>sed</code> to do a simple replacement to headers in a file.
  Sometimes they need to be replaced, sometimes not.
  It works fine, but is long because it reads the the files every time (hundreds of MB).
  However there is a pattern that separates the header from the content.</p>
  
  <p>How do I tell <code>sed</code> to stop processing the file after encountering a certain pattern ?</p>
  
  <p>Example :</p>
  
  <p>blabla headers that I want to edit here but maybe not FRAME some more content here</p>
  
  <p>Let's say that want to remove "want" from the headers, but the word may or may not be in said headers. I know that I want to stop processing the file at FRAME.</p>
  
  <p><code>sed -i '0,/\(pattern1\|pattern2\)/s//pattern1/' * ; # TODO stop at FRAME</code></p>