Search for two words in a File

Paul Howarth paul at city-fan.org
Wed Apr 26 09:50:14 UTC 2006


Kaushal Shriyan wrote:
> Hi
> 
> I have a query For example I have a file by the name test and its contents
> are
> 
> deep
> redhat
> html
> php
> 
> I know if I give grep deep test it will return deep, Now my query is
> to search for two words For example deep +  html I mean both words at
> a Time
> 
> How do I do it

$ grep -E 'deep|html' test

Paul.




More information about the fedora-list mailing list