title: Using shell tools to extract part of a file
body: <p>I've got a text file, and wish to extract every line above the !--- comment ---! into a new file, not based on line numbers (but checking for the comment). How would I do this?</p>
  
  <pre><code>test123
  bob
  ted
  mouse
  qwerty
  !--- comment ---!
  123456
  098786
  </code></pre>