I would like to process multiple .gz files with gawk. I was thinking of decompressing and passing it to gawk on the fly but I have an additional requirement to also store/print the original file name in the output.
The thing is there's 100s of .gz files with rather large size to process. Looking for anomalies (~0.001% rows) and want to print out the list of found inconsistencies ALONG with the file name and row number that contained it.
If I could have all the files decompressed I would simply use FILENAME variable to get this. Because of large quantity and size of those files I can't decompress them upfront.
Any ideas how to pass filename (in addition to the gzip stdout) to gawk to produce required output?