title: grep invert search with context
body: <p><strong>I want to filter out several lines before and after a matching line in a file.</strong></p>
  
  <p>This will remove the line that I don't want:</p>
  
  <pre><code>$ grep -v "line that i don't want"
  </code></pre>
  
  <p>And this will print the 2 lines before and after the line I don't want:</p>
  
  <pre><code>$ grep -C 2 "line that i don't want"
  </code></pre>
  
  <p>But when I combine them it does not filter out the 2 lines before and after the line I don't want:</p>
  
  <pre><code># does not remove 2 lines before and after the line I don't want:
  $ grep -v -C 2 "line that i don't want"   
  </code></pre>
  
  <p>How do I filter out not just the line I don't want, but also the lines before and after it?  I'm guessing <code>sed</code> would be better for this...</p>
  
  <p>Edit:  I know this could be done in a few lines of awk/Perl/Python/Ruby/etc, but I want to know if there is a succinct one-liner I could run from the command line.</p>