Date: Mon, 7 Jul 2008 18:20:03 GMT From: Wayne Sierke <ws@au.dyndns.ws> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/125325: Annoying grep(1) bug Message-ID: <200807071820.m67IK3lR007455@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/125325; it has been noted by GNATS. From: Wayne Sierke <ws@au.dyndns.ws> To: Ighighi <ighighi@gmail.com> Cc: bug-followup@freebsd.org Subject: Re: bin/125325: Annoying grep(1) bug Date: Tue, 08 Jul 2008 03:29:16 +0930 On Sun, 2008-07-06 at 04:50 +0000, Ighighi wrote: > > $ env -i /usr/bin/grep --colour=always :0: /etc/passwd > root:*:0:0:Charlie &:/root:/usr/local/bin/bash > toor:*:0:0:Bourne-again Superuser:/root: > > The entire ":0:0:" should be colorized. Note that this is probably to do with pattern-matching rather than colouring: %env -i /usr/bin/grep --only-matching :0: /etc/passwd :0: :0: %/usr/bin/grep --version grep (GNU grep) 2.5.1-FreeBSD ... Testing with ubuntu-8.04.1: ws@ubuntu:~$ env -i /bin/grep --colour=always :0: /etc/passwd root:x:0:0:root:/root:/bin/bash ws@ubuntu:~$ env -i /bin/grep --only-matching :0: /etc/passwd :0: ws@ubuntu:~$ /bin/grep --version GNU grep 2.5.3 ... (only the first :0: is coloured in the first result). 2.5.3 seems to be the latest version of GNU grep. It's not clear that failing to match overlapped instances of patterns is a bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807071820.m67IK3lR007455>