AIXSPadmin
MIS
Back to something that ksh isn't really suited for. I am trying to match any number of string occurrences in a 200,000+ line file and one the line matching the string is found, print the matching line plus the next 16 lines. There can be multiple string matches in the file.
I was wondering if it is possible to use something similar to:
perl -ne 'print if 3 .. 8' /etc/passwd
But not sure how to get the next 16 lines after a match is found. Thanks for any help.
I was wondering if it is possible to use something similar to:
perl -ne 'print if 3 .. 8' /etc/passwd
But not sure how to get the next 16 lines after a match is found. Thanks for any help.