Search for two words in a File

Paul Howarth paul at city-fan.org
Wed Apr 26 11:53:24 UTC 2006


Tim wrote:
> On Wed, 2006-04-26 at 10:50 +0100, Paul Howarth wrote:
>> grep -E 'deep|html' test
> 
> Wouldn't that match against *either* word, rather than require both to
> be present?

Yes, but that's what I thought the OP was looking for.

To look for both words in the same line, I'd use:

$ grep deep test | grep html

Paul.




More information about the fedora-list mailing list