Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Oct 1997 04:49:16 -0500
From:      Malcolm Boff <Malcolm_Boff@compuserve.com>
To:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Potential bug in 'grep'
Message-ID:  <199710310449_MC2-2642-E24F@compuserve.com>

next in thread | raw e-mail | index | archive | help
I have been checking out a pre-release set of software (GNU) and which
uses a function in a shell script to determine whether or not the 'echo'
command
supports the '-e' flag (on FreeBSD it doesn't).

To cut a long story short try the following :-

   (echo -e) | sed s/-e/xe/ | grep xe; echo $?

here sed returns 'xe' and therefore should satisfy a match with 'grep' and
should return '0' but it returns a '1' (no match ?).

I think this is a 'bug' anyone agree ??

PLEASE REPLY DIRECTLY TO MY MAIL ADDRESS AS I AM NO LONGER
REGISTERED WITH THE FORUM.

Malcolm G. Boff
Sylmex Ltd
Malcolm_Boff@compuserve.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710310449_MC2-2642-E24F>