From owner-freebsd-current@FreeBSD.ORG Wed Jun 18 19:10:14 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF7E7106568B; Wed, 18 Jun 2008 19:10:14 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id 6D6E88FC17; Wed, 18 Jun 2008 19:10:14 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.2/8.14.2) with ESMTP id m5IJAAQI081794; Wed, 18 Jun 2008 12:10:10 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.2/8.14.2/Submit) id m5IJAA75081793; Wed, 18 Jun 2008 12:10:10 -0700 (PDT) (envelope-from sgk) Date: Wed, 18 Jun 2008 12:10:10 -0700 From: Steve Kargl To: Doug Barton Message-ID: <20080618191010.GA81684@troutmask.apl.washington.edu> References: <188001.76281.qm@web32705.mail.mud.yahoo.com> <48593673.8030607@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48593673.8030607@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: Diomidis Spinellis , pfgshield-freebsd@yahoo.com, Gabor Kovesdan , current@freebsd.org Subject: Re: CFT: BSD-licensed grep [Fwd: cvs commit: ports/textproc/bsdgrep Makefile distinfo] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2008 19:10:14 -0000 On Wed, Jun 18, 2008 at 09:23:15AM -0700, Doug Barton wrote: > pfgshield-freebsd@yahoo.com wrote: > >On 2008-06-17, Gabor Kovesdan wrote: > >>>egrep: empty (sub)expression > >>> > >>I've looked at this and I have a patch with a workaround: > >>http://kovesdan.org/patches/grep.dougb.diff > > > >This general behavior should be considered a GNUism, the type of > >thing that we want to avoid in scripts. Perhaps, if it's too > >common, the workaround should be ifdef'd into a GNU compatible mode > >or something. > > No, "here is a new bsd grep, but change all your scripts that have > relied on legitimate behavior of grep in the past" is a non-starter. I > haven't checked POSIX to see whether the particular construction I am > using fits the spec or not, but I really don't care. We need to be > feature-compatible with the GNU versions of these tools, both for > legacy scripts and also for those users migrating over from linux. > FWIW, your RE violates strict conformance to Posix when the variable is unset. See 9.4.3 and 2.2.1 in SuSv3. -- Steve