title: Grep ignore multiple lines
body: <p>Is there a way with Grep to use the -v switch to ignore a line and the next number of lines after it. Its basically to filter exceptions from a log file i.e.</p>
  
  <pre><code>Valid log entry 1
  Exception exceptionname
      at a.b.c
      at d.e.f
      ...
  Valid log entry 2
  </code></pre>
  
  <p>grep it to produce : </p>
  
  <pre><code>Valid log entry 1
  Valid log entry 2
  </code></pre>
  
  <p>I have tried <code>grep -v Exception -A 2</code></p>
  
  <p>but this doesn't work.</p>
  
  <p>Any ideas would be appreciated.</p>