From owner-freebsd-questions Fri Oct 31 01:50:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA25636 for questions-outgoing; Fri, 31 Oct 1997 01:50:09 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from arl-img-1.compuserve.com (arl-img-1.compuserve.com [149.174.217.131]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA25626 for ; Fri, 31 Oct 1997 01:50:06 -0800 (PST) (envelope-from Malcolm_Boff@compuserve.com) Received: (from mailgate@localhost) by arl-img-1.compuserve.com (8.8.6/8.8.6/2.7) id EAA14636 for freebsd-questions@freebsd.org; Fri, 31 Oct 1997 04:49:35 -0500 (EST) Date: Fri, 31 Oct 1997 04:49:16 -0500 From: Malcolm Boff Subject: Potential bug in 'grep' To: freebsd-questions Message-ID: <199710310449_MC2-2642-E24F@compuserve.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id BAA25628 Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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