You can also give grep multiple patterns as options, which seems to be
easier for non-unix ppl (ie dba's) to remember.

grep -e pattern1 -e pattern2 -e pattern3

-t.


> -----Original Message-----
> From: Blake C. Lewis [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 19, 2002 9:39 AM
> To: [EMAIL PROTECTED]
> Subject: Re: grep 'or'
> 
> 
> from "info regex":
>    Alternatives match one of a choice of regular expressions: 
> if you put
> the character(s) representing the alternation operator between any two
> regular expressions A and B, the result matches the union of the
> strings that A and B match.  For example, supposing that `|' is the
> alternation operator, then `foo|bar|quux' would match any of `foo',
> `bar' or `quux'.
> 
> smoke wrote:
> > is there a way to "or" grep?
> > 
> > like grep a or b
> > 
> >  thanks!
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > New DSL Internet Access from SBC & Yahoo!
> > http://sbc.yahoo.com
> > 
> > 
> > 
> 
> 
> 
> -- 
> redhat-list mailing list
> unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
> https://listman.redhat.com/mailman/listinfo/redhat-list
> 



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to