Re: CFT: BSD-licensed grep [Fwd: cvs commit: ports/textproc/bsdgrep Makefile distinfo]

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Wed, 18 Jun 2008 12:10:10 -0700
On Wed, Jun 18, 2008 at 09:23:15AM -0700, Doug Barton wrote:
> pfgshield-freebsd_at_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
Received on Wed Jun 18 2008 - 17:10:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:32 UTC