alexbotea2005
Technical User
- Nov 4, 2010
- 4
Code:
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