From owner-freebsd-current@FreeBSD.ORG Sun Sep 18 01:38:32 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 678C41065743; Sun, 18 Sep 2011 01:38:32 +0000 (UTC) (envelope-from poyopoyo@puripuri.plala.or.jp) Received: from msa03b.plala.or.jp (msa03.plala.or.jp [IPv6:2400:7800:0:5010::3]) by mx1.freebsd.org (Postfix) with ESMTP id C7F518FC08; Sun, 18 Sep 2011 01:38:31 +0000 (UTC) Received: from i125-202-7-242.s02.a026.ap.plala.or.jp ([125.202.7.242]) by msa03b.plala.or.jp with ESMTP id <20110918013830.ELTT5763.msa03b.plala.or.jp@i125-202-7-242.s02.a026.ap.plala.or.jp>; Sun, 18 Sep 2011 10:38:30 +0900 Date: Sun, 18 Sep 2011 10:38:29 +0900 Message-ID: <86ipoqsk8a.wl%poyopoyo@puripuri.plala.or.jp> From: poyopoyo@puripuri.plala.or.jp To: Gabor Kovesdan To: freebsd-current@FreeBSD.org User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29qGyQoRCtXGyhC?=) APEL/10.8 Emacs/23.3 (amd64-portbld-freebsd9.0) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-VirusScan: Outbound; msa03b; Sun, 18 Sep 2011 10:38:30 +0900 X-Mailman-Approved-At: Sun, 18 Sep 2011 01:44:43 +0000 Cc: Subject: bsdgrep: does anyone see this? 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: Sun, 18 Sep 2011 01:38:32 -0000 Hi, On the latest -CURRENT of r225642 built with single line "WITH_BSD_GREP=yes" in src.conf, $ type -a grep grep is /usr/bin/grep $ grep -V grep (BSD grep) 2.5.1-FreeBSD $ locale LANG= LC_CTYPE="C" LC_COLLATE="C" LC_TIME=C LC_NUMERIC="C" LC_MONETARY="C" LC_MESSAGES=C LC_ALL= $ echo |grep -q '^'; echo $? 1 $ echo |grep -qv '^'; echo $? 0 $ echo |gnugrep -q '^'; echo $? 0 $ echo |gnugrep -qv '^'; echo $? 1 I believe GNU grep is correct, and bsdgrep inverts logic when input is a newline. Imagine my astonishment when yes ""|grep -v '^$' scrolled out console text instantly. :) I also tested stock GNU grep on RELENG_8 chroot sandbox, bsd-grep-20110912 from ports on both RELENG_8 and 9-CURRENT, and found they work all OK as GNU grep. So I think this has been fixed in the latest bsdgrep but not checked in to -CURRENT yet. Am I correct? Does anyone see this on your 9-CURRENT box? -- kuro