Answer the question
In order to leave comments, you need to log in
How to find files that have 2 words in the content?
Good day to all.
There is an archive of mail for 4 years. You need to find in it letters sent from a specific box to a specific one. As I understand it, the easiest way is to search by content using the same grep.
But how to set a command to search the entire file using 2 expressions? By simply passing arguments through "-e" I will make it search line by line, but the expressions may occur on different lines of the file. Please help.
Answer the question
In order to leave comments, you need to log in
Search by the first word, make a list of files. Similarly, search for the second. Find matches between lists.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question