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.
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.
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