Posted By

lakedenman on 04/22/08


grep line before after

Versions (?)

Before and After

 / Published in: Bash

"-b" and "-a" tells grep to show you 10 lines before and 10 lines after

  1. cat some_log_file | grep -b 10 -a 10 "something to search for"

Report this snippet  

You need to login to post a comment.