I want to search each line for the word FAILED, then print the line above and below each matching line, as well as the matching line.
Input:
id : 15
Status : SUCCESS
Message : no problem
id : 15
Status : FAILED
Message : connection error
Desired output for grep 'FAILED':
id : 15
Status : FAILED
Message : connection error
 
     
     
     
     
    