From owner-freebsd-bugs@FreeBSD.ORG Thu Sep 30 14:50:25 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D092C16A4CE for ; Thu, 30 Sep 2004 14:50:25 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8B5643D49 for ; Thu, 30 Sep 2004 14:50:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8UEoPFE070359 for ; Thu, 30 Sep 2004 14:50:25 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8UEoP6J070358; Thu, 30 Sep 2004 14:50:25 GMT (envelope-from gnats) Resent-Date: Thu, 30 Sep 2004 14:50:25 GMT Resent-Message-Id: <200409301450.i8UEoP6J070358@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "J.R. Oldroyd" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B2CE16A4CE for ; Thu, 30 Sep 2004 14:40:42 +0000 (GMT) Received: from linwhf.opal.com (119.79.171.66.subscriber.vzavenue.net [66.171.79.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id B63E043D45 for ; Thu, 30 Sep 2004 14:40:41 +0000 (GMT) (envelope-from jr@linwhf.opal.com) Received: from linwhf.opal.com (localhost [127.0.0.1]) by linwhf.opal.com (8.13.1/8.13.1) with ESMTP id i8UEeeRZ027935 for ; Thu, 30 Sep 2004 10:40:40 -0400 (EDT) (envelope-from jr@linwhf.opal.com) Received: (from jr@localhost) by linwhf.opal.com (8.13.1/8.13.1/Submit) id i8UEee0Z027934; Thu, 30 Sep 2004 10:40:40 -0400 (EDT) (envelope-from jr) Message-Id: <200409301440.i8UEee0Z027934@linwhf.opal.com> Date: Thu, 30 Sep 2004 10:40:40 -0400 (EDT) From: "J.R. Oldroyd" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: gnu/72200: bzXgrep fails to detect that its matcher is Xgrep X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "J.R. Oldroyd" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2004 14:50:25 -0000 >Number: 72200 >Category: gnu >Synopsis: bzXgrep fails to detect that its matcher is Xgrep >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 30 14:50:25 GMT 2004 >Closed-Date: >Last-Modified: >Originator: J.R. Oldroyd >Release: FreeBSD 6.0-CURRENT i386 >Organization: >Environment: System: FreeBSD linwhf.opal.com 6.0-CURRENT FreeBSD 6.0-CURRENT #62: Tue Sep 28 15:27:07 EDT 2004 jr@linwhf.opal.com:/usr/src-current/sys/i386/compile/LINWHF i386 >Description: When grep(1) is invoked as bzegrep or bzfgrep, it fails to detect that it should use the egrep or fgrep matcher and behaves as grep. Use of the -E or -F flags works, i.e., it is the parsing of argv[0] that's broke. >How-To-Repeat: $ bzegrep '^(root|toor):' /etc/passwd $ compare with: $ bzegrep -E '^(root|toor):' /etc/passwd root:*:0:0:Charlie &:/root:/bin/csh toor:*:0:0:Bourne-again Superuser:/root: $ >Fix: --- grep.origc Sun Jul 4 12:16:59 2004 +++ grep.c Thu Sep 30 10:38:16 2004 @@ -1413,6 +1413,9 @@ if (program_name[0] == 'b') { BZflag = 1; ++program_name; + if (program_name[0] == 'z') { + ++program_name; + } } #if defined(__MSDOS__) || defined(_WIN32) >Release-Note: >Audit-Trail: >Unformatted: