grep command two patterns
Posted on 2004-08-11
can't get this right for some reason:
I want to do a search for any line that contains two differnt items, must contain both, when I do a search I still get all lines that
contain one or the other or both, I want only the lines that contain Both.
I use this command and it works but gives me all lines that contain either word.
grep 1stWord 2ndWord -e file1