title: How to exclude several lines around match with grep or similar tool?
body: <p>I can find all non-matched lines of file with <code>grep -v 'my_pattern' some_file</code>. Also i can print few strings before/after/around match with <code>-A</code>, <code>-B</code> or <code>-C</code> options of grep. But i can't combine these two options to exclude lines with pattern and certain amount of lines near matched lines - grep shows entire file as result. For example, i have log with a lot of patterns like this:</p>
  
  <pre><code>25.02.2012 10:41:37 here goes memory state
  25MiB free
  16MiB allocated
  max free block is 4MiB
  </code></pre>
  
  <p>I'd like to filter them. Of course, i can write custom perl/awk script, but is there more elegant way to do this?</p>