title: How to remove lines above and below an inverse grep match?
body: <p>I'm working with some output that is more verbose than I'd like, so I was trying to use grep to whittle it down. The output looks something like this…</p>
  
  <pre><code>path/to/file1:
  No Problems Found
  
  path/to/file3:
  Problem Found
  </code></pre>
  
  <p>I'd like to filter out all the output concerning files without problems. I'm able to remove one line of it by piping the output through <code>grep -v "No Problems Found"</code>. I thought I'd then be able to use -B and -A along the lines of <code>grep -B 1 -A 1 -v "No Problems Found"</code> but it turns out those don't invert when used in conjunction with -v.</p>
  
  <p>I can modify the output pretty quickly in Vim, after I've exported the file, but I'd like to do it directly on the command line, if I can. Any ideas? Is this a better job for Awk or Sed?</p>