Help with grep command to search 2 strings
Hello,
I need to filter lines in my Exim logs that contain emails sent from address A to B
so I am looking for a grep or zgrep command for that purpose, and was wondering if
anybody here can help me with this
Thanks in advance
-
grep "one string" /path/to/file | grep "another string"
The above will show lines containing both strings.0 -
Even easier with egrep: egrep "address1@something.tld|address2@something.tld" /path/to/file The pipe "|" is an or to egrep. 0
Please sign in to leave a comment.
Comments
2 comments