grep nth line after match code example
Example 1: grep nth line after match
awk 'c&&!--c;/pattern/{c=N}' file
Example 2: grep third line after match
Include -A flag to add lines after match
grep match -A 3 #display match line and 3 after lines
awk 'c&&!--c;/pattern/{c=N}' file
Include -A flag to add lines after match
grep match -A 3 #display match line and 3 after lines