title: Unix command for extracting lines befor and after a particular searched string pattern
body: <p>How can I search for lines in a file and extract the lines above and below lines of the searched line .</p>
  
  <p>My input is like </p>
  
  <pre><code>Tue Jun 26 14:59:46 2012
   Warning ffffffff act_msg_ctms_remove_from_pending_queue: deleting message 44817201 from the queue.
  Tue Jun 26 14:59:46 2012
   Warning ffffffff Finishing processing record number 44817201
  Tue Jun 26 14:59:46 2012
   Warning  5000000 activity_queue_manager_finish_cb: unknown activity 120.
  Tue Jun 26 14:59:46 2012
   Warning ffffffff Activity State Machine priority (2) finished
  Tue Jun 26 14:59:46 2012
   Warning ffffffff 
  ====================================================
  Processing database file "INCOMING_MESSAGES" record number 47810234 from user "(unknown)"
  Tue Jun 26 14:59:46 2012
   Warning ffffffff ACTIVITY data: rec_num (47810234) size (116) 
  Tue Jun 26 14:59:46 2012
   Warning ffffffff activity status: ACT_SENT 
  Tue Jun 26 14:59:46 2012
   Warning ffffffff MESSAGE body "MVT
  QFA6673/26.VHQOS.BNE
  EA0541
  "
  Tue Jun 26 14:59:46 2012
   Warning ffffffff Finishing processing record number 47810234
  Tue Jun 26 14:59:46 2012
   Warning ffffffff Activity State Machine priority (1) finished
  Tue Jun 26 14:59:46 2012
   Warning ffffffff 
  End processing record number 47810234
  </code></pre>
  
  <p>====================================================</p>
  
  <p>And I require my output to be like </p>
  
  <pre><code>/
  
  Tue Jun 26 14:59:46 2012
   Warning ffffffff MESSAGE body "MVT
  QFA6673/26.VHQOS.BNE
  EA0541"
  
  /
  </code></pre>
  
  <p>My search string would be MVT.</p>
  
  <p>Pls help</p>