On Thu, Sep 07, 2006 at 05:44:40PM +0200, Otto Moerbeek wrote:
> On Thu, 7 Sep 2006, AndrC)s wrote:
> 
> > egrep shouldn't find anything, you are searching for the string "" in
> > "some text here", clearly, it isn't there.
> 
> Nah, an empty search pattern should match any line, as defined by SU
> and the man page. The only problem is if the -x option takes
> precendence or not. SU does not say a word about that.
> 
> If anybody has access to a Solaris machine, I like to know what the
> test does there.
> 
>       -Otto
> 
> >
> > On 9/7/06, Martin Marusak <[EMAIL PROTECTED]> wrote:
> > > OpenBSD egrep finds nothing in any text:
> > > ---
> > > % echo "some text here" | egrep -x "" ; echo $status
> > > some text here
> > > 0
> > > ---
> > >
> > > GNU grep does not:
> > > ---
> > > % echo "some text here" | gegrep -x "" ; echo $status
> > > 1
> > > ---
> > > Isn't that a bug in OpenBSD egrep?
> > >
> > > M.
> > >
> > >
> >
> >
> > --
> > AndrC)s Delfino
> 

Sun Microsystems Inc.   SunOS 5.9       Generic May 2002

taz$ echo "some text here" | egrep -x "" ; echo $status
egrep: illegal option -- x
usage: egrep [ -bchilnsv ] [ -e exp ] [ -f file ] [ strings ] [ file ]
...

taz$ echo "some text here" | egrep "" ; echo $status
egrep: syntax error

taz$ 

Reply via email to