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!!!
aqnjrtek
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!!!
aqnjrtek