Re: How to grep xxx or yyyy
- From: "Colin B." <cbigam@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 10 Jan 2007 17:25:52 GMT
dingdongdingding@xxxxxxxxx wrote:
Hi !
I need to search the logs for events matching a condition that
occurred today or yesterday. I know how to do a AND but how to do a OR
?
AND
grep "event" | grep today_date
OR
grep "event" | grep today_date OR yesterday_date.......... how ???
With grep, you can't really. Use egrep instead, and you can separate test
strings with |.
I have forced my fingers to learn 'egrep' in place of 'grep' since it is
100% compatabile with grep (as far as I've ever seen), and also ubiquitous.
Colin
.
- Follow-Ups:
- Re: How to grep xxx or yyyy
- From: Sven Mascheck
- Re: How to grep xxx or yyyy
- References:
- How to grep xxx or yyyy
- From: dingdongdingding
- How to grep xxx or yyyy
- Prev by Date: Re: Symbolic Link
- Next by Date: Re: Sun E10000 question
- Previous by thread: Re: How to grep xxx or yyyy
- Next by thread: Re: How to grep xxx or yyyy
- Index(es):
Relevant Pages
|