From owner-freebsd-current@FreeBSD.ORG Tue Feb 14 20:58:25 2012 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 EAA0F106564A; Tue, 14 Feb 2012 20:58:25 +0000 (UTC) (envelope-from poyopoyo@puripuri.plala.or.jp) Received: from msa03a.plala.or.jp (msa03.plala.or.jp [IPv6:2400:7800:0:5010::3]) by mx1.freebsd.org (Postfix) with ESMTP id 54EFB8FC14; Tue, 14 Feb 2012 20:58:25 +0000 (UTC) Received: from i220-220-25-94.s02.a026.ap.plala.or.jp ([220.220.25.94]) by msa04b.plala.or.jp with ESMTP id <20120214204659.ZKVC6839.msa04b.plala.or.jp@i220-220-25-94.s02.a026.ap.plala.or.jp>; Wed, 15 Feb 2012 05:46:59 +0900 Date: Wed, 15 Feb 2012 05:46:59 +0900 Message-ID: <86k43pb0sc.wl%poyopoyo@puripuri.plala.or.jp> From: poyopoyo@puripuri.plala.or.jp To: Gabor Kovesdan User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29q?= =?ISO-2022-JP-2?B?GyQoRCtXGyhC?=) APEL/10.8 Emacs/23.3 (amd64-portbld-freebsd9.9) MULE/6.0 (HANACHIRUSATO) 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.9) 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; msa04b; Wed, 15 Feb 2012 05:46:59 +0900 X-Mailman-Approved-At: Tue, 14 Feb 2012 21:38:45 +0000 Cc: FreeBSD-current@FreeBSD.org Subject: bsdgrep: xzgrep gives up searching too early 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: Tue, 14 Feb 2012 20:58:26 -0000 This is -CURRENT of r231204, 9 Feb. xzgrep seems to give up at first read(). $ yes a|head|xz|xzgrep -c a 10 $ yes a|head -100|xz|xzgrep -c a 100 $ yes a|head -10000|xz|xzgrep -c a 10000 $ yes a|head -100000|xz|xzgrep -c a 16384 bzgrep, zgrep and grep works as expected. $ yes a|head|bzip2|bzgrep -c a 10 $ yes a|head -100|bzip2|bzgrep -c a 100 $ yes a|head -1000|bzip2|bzgrep -c a 1000 $ yes a|head -10000|bzip2|bzgrep -c a 10000 $ yes a|head -100000|bzip2|bzgrep -c a 100000 $ yes a|head -1000000|bzip2|bzgrep -c a 1000000 $ yes a|head -10000000|bzip2|bzgrep -c a 10000000 $ yes a|head|gzip|zgrep -c a 10 $ yes a|head -100|gzip|zgrep -c a 100 $ yes a|head -1000|gzip|zgrep -c a 1000 $ yes a|head -10000|gzip|zgrep -c a 10000 $ yes a|head -100000|gzip|zgrep -c a 100000 $ yes a|head -1000000|gzip|zgrep -c a 1000000 $ yes a|head -10000000|gzip|zgrep -c a 10000000 $ yes a|head|grep -c a 10 $ yes a|head -100|grep -c a 100 $ yes a|head -1000|grep -c a 1000 $ yes a|head -10000|grep -c a 10000 $ yes a|head -100000|grep -c a 100000 $ yes a|head -1000000|grep -c a 1000000 $ yes a|head -10000000|grep -c a 10000000 they are single binary (linked statically) $ for f in xzgrep bzgrep zgrep grep; do ls -l $(which $f); done -r-xr-xr-x 15 root wheel 578352 Feb 2 00:39 /usr/bin/xzgrep* -r-xr-xr-x 15 root wheel 578352 Feb 2 00:39 /usr/bin/bzgrep* -r-xr-xr-x 15 root wheel 578352 Feb 2 00:39 /usr/bin/zgrep* -r-xr-xr-x 15 root wheel 578352 Feb 2 00:39 /usr/bin/grep* -- kuro