0

I am trying to come up with a script or a command to find the line that is 2 lines below a search parameter in AIX. Please help with the correct command syntax.

Thanks in advance.

Sandeep
  • 95
  • 9

1 Answers1

0

I have found the answer based on the answer given here: How to print 5 consecutive lines after a pattern in file using awk

awk '/pattern/ {print $0; {getline;getline; print}}' filename
Sandeep
  • 95
  • 9