April
0
Q:

grep third line after match

Include -A flag to add lines after match
grep match -A 3	#display match line and 3 after lines
0
#Combine grep and tail for grepping until second match and filtering 
#last with tail command
grep -m2 "two" in-file.txt | tail -n1
0
awk 'c&&!--c;/pattern/{c=N}' file
0

New to Communities?

Join the community