bin/166842: bsdgrep(1) inconsistently handles ^ in non-anchoring positions

Jim Pryor jim at jimpryor.net
Fri Apr 13 01:47:12 UTC 2012


That's great, then it looks to be fixed in current version of bsdgrep. I didn't test against gnugrep on FreeBSD, only on Linux.

-- 
Jim Pryor

----- Reply message -----
From: "Eitan Adler" <lists at eitanadler.com>
To: "Jim Pryor" <dubiousjim at gmail.com>
Cc: "John D. Hendrickson and Sara Darnell" <johnandsara2 at cox.net>, <freebsd-bugs at freebsd.org>
Subject: bin/166842: bsdgrep(1) inconsistently handles ^ in non-anchoring positions
Date: Thu, Apr 12, 2012 8:55 pm


Some notes:

[10010 eitan at radar ~ ]%uname -rms
FreeBSD 10.0-CURRENT amd64
[10007 eitan at radar ~ ]%bsdgrep --version
bsdgrep (BSD grep) 2.5.1-FreeBSD
[10004 eitan at radar ~ ]%printf 'abc def' | bsdgrep -o '^[a-z]'
a
[10006 eitan at radar ~ ]%gnugrep --version
gnugrep (GNU grep) 2.5.1-FreeBSD
[10005 eitan at radar ~ ]%printf 'abc def' | gnugrep -o '^[a-z]'
a
b
c
[441 eadler1 at harvey ~ ]%uname -rms
Linux 2.6.38-13-generic-pae i686
[437 eadler1 at harvey ~ ]%grep --version
GNU grep 2.6.3
[439 eadler1 at harvey ~ ]%printf 'abc def' | grep -o '^[a-z]'
a

-- 
Eitan Adler


More information about the freebsd-bugs mailing list