Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

grep 10 line before

Include -A flag to add lines after match and -B flag to add lines before
grep match -A 3	#display match line and 3 after lines
grep match -B 2 #display match line and 2 lines before
 
PREVIOUS NEXT
Tagged: #grep #line
ADD COMMENT
Topic
Name
8+1 =