To answer your question, grep, egrep, fgrep do not support negative
lookahead assertion. Perl and tcl (and prob others) do. Read man perlre
for more on that. (It basically lets you specify in one regex to match
<expression> iff <other expression> doesn't match. I regularly pipe
through two greps, often with the -v flag and have no problems. I doubt
it's a tail or grep problem iow.

jason h fowler wrote:
> 
> hey ... i'm trying to filter the output of tail ...
> i know to show everything that says "something" all i have to do is pipe
> the output of tail into grep ... like:
> tail -f /etc/httpd/logs/access_log | grep something
> and i know to have everything show except for "somethingelse" i do:
> tail -f /etc/httpd/logs/access_log | grep -v somethingelse
> but can i, using one grep command, show only "something" but not
> "somethingelse" ? ...
> i've tryed:
> tail -f /etc/httpd/logs/access_log | grep someting | grep -v
> somethingelse
> but that spits out big hunks every 1-2 minutes ... it doesn't actually
> follow it real time ... and yes i have read the man page for it ... but
> i didn't see anything to say about combining what i want to search for
> and what i want to skip ... if it's painfully obvious, please help me
> out ... sometimes i'm pretty stupid ... (c:
> thanx a lot,
> jason fowler
---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]

Reply via email to