Hello!!!
I am an awk newbie. I just want to know how to print the whole range of 19 lines before and 26 lines after a match.
I used
awk '{if ($1=="pattern" && $2>0) print}' input.file
I got all that matched but I need the match plus 19 lines before it and 26 lines after it.
Thanks a lot...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.