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.

jimmij
  • 47,140

1 Answers1

7

Just make use of FILENAME built-in variable:

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