NetBSD Problem Report #48688

From www@NetBSD.org  Sat Mar 29 05:55:39 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 4B867A409E
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 29 Mar 2014 05:55:39 +0000 (UTC)
Message-Id: <20140329055537.ACDA7A5809@mollari.NetBSD.org>
Date: Sat, 29 Mar 2014 05:55:37 +0000 (UTC)
From: unicorn+netbsd@sdf.org
Reply-To: unicorn+netbsd@sdf.org
To: gnats-bugs@NetBSD.org
Subject: When using grep with -i and -o options together, -i is ignored
X-Send-Pr-Version: www-1.0

>Number:         48688
>Category:       bin
>Synopsis:       When using grep with -i and -o options together, -i is ignored
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 29 06:00:00 +0000 2014
>Last-Modified:  Wed Jun 11 23:20:00 +0000 2014
>Originator:     Chuck Martin
>Release:        6.1 Stable
>Organization:
>Environment:
NetBSD iceland 6.1_STABLE NetBSD 6.1_STABLE (SDF6.amd64) #0: Tue Nov 26 12:49:14 UTC 2013  root@bjork:/spare/netbsd/src/sys/arch/amd64/compile/SDF6.amd64 amd64
>Description:
When using the grep command with both the -i and -o options, no matches
are returned unless the case matches, meaning that the -i option is
being ignored.
>How-To-Repeat:
unicorn@iceland:~% echo OMICRON | grep -oi micro
unicorn@iceland:~% echo omicron | grep -oi micro
micro
unicorn@iceland:~%
>Fix:
It seems that the version of GNU grep included is about 13 years old:

| unicorn@iceland:~% grep -V
| grep (GNU grep) 2.5.1 nb1
|
| Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
| This is free software; see the source for copying conditions. There is NO
| warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This may be partly because the GNU web site is woefully out-of-date,
claiming that version 2.5.1a is the latest stable release, when numerous
versions have come out since then, and every other O/S seems to have a
version much newer than that.  Please update to a newer version in NetBSD
as well.

>Audit-Trail:
From: David H.Gutteridge <dhgutteridge@sympatico.ca>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/48688 (When using grep with -i and -o options together, -i is ignored)
Date: Wed, 11 Jun 2014 18:17:05 -0400

 I noticed this PR after having stumbled over several problems of my
 own with the aged version of grep that's installed. (One could of
 course install GNU grep 2.19 from pkgsrc and use that instead.)

 This example works correctly with new versions of GNU grep and also
 the BSD licensed version that's found in src/usr.bin/grep which
 hasn't supplanted GNU grep yet.

 Dave

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.