Answers for "grep 2 lines after match"

0

grep line after match

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
Posted by: Guest on November-26-2020
0

grep third line after match

Include -A flag to add lines after match
grep match -A 3	#display match line and 3 after lines
Posted by: Guest on November-26-2020

Browse Popular Code Answers by Language