The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-24-2009
Sepia Sepia is offline
Registered User
  
 

Join Date: Apr 2007
Location: England
Posts: 49
Question Grep for lines with X and Y

Is it possible to grep for lines in a file that have two strings?

I am grepping a tail -f of a file.

I want to display the full line or all lines with cat and dog in them

#tail -f log.log | grep cat and dog

Any ideas?

Thanks.