-A see N lines following the matching line
-B see N lines before the matching line
-number see lines before and after
[root@host33 enterprise]# grep -A 3 ' message' *app.log |more Please report this message and include the following information to us.<br/> Thank you very much!</p> <table> <tr> -- Please report this message and include the following information to us.<br/> Thank you very much!</p> <table> <tr> [root@host33 enterprise]# grep -B 3 ' message' *app.log |more <body bgcolor="white"> <h1>502 Bad Gateway</h1> <p>The proxy server received an invalid response from an upstream server. Sorry for the inconvenience.<br/> Please report this message and include the following information to us.<br/> -- [root@host33 enterprise]# grep -3 ' message' *app.log |more <body bgcolor="white"> <h1>502 Bad Gateway</h1> <p>The proxy server received an invalid response from an upstream server. Sorry for the inconvenience.<br/> Please report this message and include the following information to us.<br/> Thank you very much!</p> <table> <tr> --