TonyG
unread,Sep 9, 2013, 10:01:26 PM9/9/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I use a simple awk expression to print blocks of lines between two patterns:
awk '/pattern1/,/pattern2/' file
and would like to add current FILENAME before each block (one per file). The following doesn't work, since it prints FILENAME after each line...:
awk '{print FILENAME} /pattern1/,/pattern2/' file
Using nextfile doesn't help... What's the proper syntax?