I would like to ask how to grep in a certain file that contains filenames, criteria for grep will come from another file. Example:
newFile0001_1573001341083_123_0.txt newFile0002_1573001341207_134_0.txt newFile0003_1573415111000_251_0.txt newFile0004_1999999999991_238_0.txt newFile0005_1573002061581_305_0.txt
870752450724347692,2019-11-11 00:12:17,1573411337,1573407737,1573414937 870423450725349173,2019-11-11 00:21:08,1573411868,1573408268,1573415468 868909450732354559,2019-11-11 00:56:43,1573414003,1573410403,1573417603
where 2nd column is date/time,
3rd column is date/time in epoch,
4th column is date/time -1hr in epoch,
5th column is date/time +1hr in epoch.
How do I grep in fileA.txt (get each matching newFile0000_XXXXXXXXXX000_000_0.txt)
using 4th column (lower limit) and 5th column (upper limit) as range from each line in fileB.txt?
So from the example, fileA.txt 3rd entry should be fetched based from fileB.txt 2nd entry.