Usually I'll chain greps in that case:

grep "Sent" maillog | grep -v "randomwords" | less

Why use a regexp when there's an easier way? ;)

Jamie


On Mon, August 8, 2005 12:17 pm, Shane wrote:
> Hi all,
>
>
> I'm wondering if you could grep a file looking for one quantity but not
> another. For example, I want to parse my mail log for mails which aren't
> from my domain and sent.
>
> I know that I can:
>
>
> cat maillog | grep -v "randomwords.ca"
>
> and I can also:
>
> cat maillog | grep "Sent"
>
> Is there a way that I could:
>
>
> cat maillog | grep "Sent" AND NOT "randomwords.ca"
>
> Any regexp gurus out there? TIA
>
>
> Shane
>
>
>
> _______________________________________________
> clug-talk mailing list [email protected]
> http://clug.ca/mailman/listinfo/clug-talk_clug.ca
> Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
> **Please remove these lines when replying
>
>


-- 
Jamie Furtner [EMAIL PROTECTED]
"The difference between intelligence and stupidity is that
 intelligence has its limits."
  --unknown


_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to