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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

awk multiple input files question

Status
Not open for further replies.

gsopitan

MIS
Oct 14, 2008
5
US
Please help me out with this; I am trying to run the simple one-liner on multiple input files

awk -F '$2 ~ /^GOOG/ { print FILENAME, $1, $5 }' files

The problem I am having is that I am trying to run this on about 500 files and I don't know how to do that without typing in each filename. Any ideas would be greatly appreciated
 
Does awk -F '$2 ~ /^GOOG/ { print FILENAME, $1, $5 }' * not do what you need?

Annihilannic.
 
Some starting points:
awk -F '$2 ~ /^GOOG/ { print FILENAME, $1, $5 }' *

find . -type f | xargs awk -F '$2 ~ /^GOOG/ { print FILENAME, $1, $5 }'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top