Let us say I have a list of files with extension .txt.
And I'd like to know what is the name of the files that match a regex pattern, how would I do that in linux.
Right now I am doing:
cat *.txt | grep -f list.txt
where list.txt contains a list of regex patterns.
This command only shows me that the pattern was matched but I cannot see the name of the file that matched it...