title: How can I make grep print the lines below and above each matching line?
body: <p>I want to search each line for the word <code>FAILED</code>, then print the line above and below each matching line, as well as the matching line.</p>
  <hr />
  <p>Input:</p>
  <pre><code>id : 15
  Status : SUCCESS
  Message : no problem
  
  id : 15
  Status : FAILED
  Message : connection error
  </code></pre>
  <p>Desired output for <code>grep 'FAILED'</code>:</p>
  <pre><code>id : 15
  Status : FAILED
  Message : connection error
  </code></pre>