I was wondering how to perform the below query using Bash code,
but I don't need all code written out exactly, just get the idea how to :
The question is: I'm looking for any file, or files, that contain multiple words.
I don't need the name of files of which have a line that contains all of these words, like this:
I need the name of the file or files that have ALL of the words, but ANYWHERE INSIDE the file.
( So, not in the same line necessarily )
I would think GREP would be needed, but I'm not sure how to use it then.
but I don't need all code written out exactly, just get the idea how to :
The question is: I'm looking for any file, or files, that contain multiple words.
I don't need the name of files of which have a line that contains all of these words, like this:
grep word1 file.txt | grep word2 | grep word3
I need the name of the file or files that have ALL of the words, but ANYWHERE INSIDE the file.
( So, not in the same line necessarily )
I would think GREP would be needed, but I'm not sure how to use it then.