bt707
asked on
grep command two patterns
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.
Ex:
I use this command and it works but gives me all lines that contain either word.
grep 1stWord 2ndWord -e file1
Thanks,
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.
Ex:
I use this command and it works but gives me all lines that contain either word.
grep 1stWord 2ndWord -e file1
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER