Re: egrep and conditions
- From: Thomas 'PointedEars' Lahn <PointedEars@xxxxxx>
- Date: Wed, 04 May 2011 20:19:02 +0200
Seebs wrote:
JAW wrote:
I am looking to get a zero return code only if offset and gov are in
the display
You probably want:
"(offset.*gov)|(gov.*offset)"
Thinking this through should explain all. (Note that I may have gotten
the backslashes wrong, I'm not really awake yet.)
It is correct, no backslashes are needed here (with *e*grep). One does not
need the parentheses, though, because concatenation binds stronger than
alternation:
egrep -e 'offset.*gov|gov.*offset' >/dev/null 2>&1
--
PointedEars
Bitte keine Kopien per E-Mail. / Please do not Cc: me.
.
- Follow-Ups:
- Re: egrep and conditions
- From: Thomas 'PointedEars' Lahn
- Re: egrep and conditions
- References:
- egrep and conditions
- From: JAW
- Re: egrep and conditions
- From: Seebs
- egrep and conditions
- Prev by Date: Re: egrep and conditions
- Next by Date: Re: egrep and conditions
- Previous by thread: Re: egrep and conditions
- Next by thread: Re: egrep and conditions
- Index(es):
Relevant Pages
|