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 TouchToneTommy 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: *

  1. alexbotea2005

    pattern matching and print filename

    awk '/ pattern/ {show[NR+2]++} show[NR]' *.txt The above code search for pattern in several text files and when pattern is found than prints the 2'nd row after. How do I add the filename to be printed in the same line with the pattern? Thanks in advance

Part and Inventory Search

Back
Top