1

I have many files in a location where I need to list file names in which 32th column has value more than 3000.

This is the command that gives me those records:

awk -F, '$32 > 3000' *

Now can anyone tell me how can I get names of those files that have these records.

1 Answer 1

7

Just make use of FILENAME built-in variable:

awk -F, '$32 > 3000{print FILENAME; nextfile}' *

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .