The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
Grep for lines with X and Y
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Grep for lines with X and Y
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
06-24-2009
jim mcnamara
...@...
Join Date: Feb 2004
Location: NM
Posts: 5,811
if you can have cat ... dog and/or dog .. cat:
one way:
Code:
tail -f somefile | grep cat | grep dog
if cat always comes before dog
one way:
Code:
tail -f somefile | grep 'cat.*dog'
jim mcnamara
View Public Profile
Find all posts by jim mcnamara
Find jim mcnamara's past nominations received
Find jim mcnamara's present nominations given