How to Show Surrounding Lines Around Matches With grep for Linux
grep is a search utility for finding strings and patterns in files and console input. By default, it prints the line that contains the match, but it’s also useful to print out the preceding lines around a match for context.Read This Article on How-To Geek ›

grep is a search utility for finding strings and patterns in files and console input. By default, it prints the line that contains the match, but it’s also useful to print out the preceding lines around a match for context.