title: grep a block of text delimited by two key lines
body: <p>I have a text file that contains text blocks roughly formatted like this:</p>
  
  <pre><code>Beginning of block
  ...
  ...
  ...
  .........some_pattern.......
  ...
  ...
  End of block
  
  Beginning of block
  ...
  ... etc.
  </code></pre>
  
  <p>The blocks can have any number of lines but always start with the two delimiters. What I'd like to do is match "some_pattern" and print the whole block to stdout. With the example above, I would get this only:</p>
  
  <pre><code>Beginning of block
  ...
  ...
  ...
  .........some_pattern.......
  ...
  ...
  End of block
  </code></pre>
  
  <p>I've tried with something like this but without success:</p>
  
  <pre><code>grep "Beginning of block\n.*some_pattern.*\n.*End of block"
  </code></pre>
  
  <p>Any idea how to do this with grep? (or maybe with some other tool)</p>