Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: aqnjrtek
  • Content: Threads
  • Order by date
  1. aqnjrtek

    printing lines before and after a match

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

Part and Inventory Search

Back
Top