From owner-freebsd-current Thu Nov 11 12:29:34 1999 Delivered-To: freebsd-current@freebsd.org Received: from barracuda.aquarium.rtci.com (barracuda.aquarium.rtci.com [208.11.247.5]) by hub.freebsd.org (Postfix) with ESMTP id DB2B914E3D for ; Thu, 11 Nov 1999 12:29:14 -0800 (PST) (envelope-from tstromberg@rtci.com) Received: from rtci.com (karma.afterthought.org [208.11.244.6]) by barracuda.aquarium.rtci.com (8.9.3+Sun/8.9.3) with ESMTP id PAA18268; Thu, 11 Nov 1999 15:29:17 -0500 (EST) Message-ID: <382B2711.E13A1CC8@rtci.com> Date: Thu, 11 Nov 1999 15:29:05 -0500 From: Thomas Stromberg Organization: Research Triangle Commerce, Inc. X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 4.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-current@freebsd.org, bug-gnu-utils@gnu.org Subject: Bad 'grep' behaviour in -CURRENT, faulty binary detection? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I just happened to notice this today. For some reason 'grep' seems to think that 'set' output is binary, not text. Seems that GNU grep 2.3 is a little too sensitive to text/binary detection. This only seems to affect -CURRENT because -STABLE runs GNU grep 2.0. (This was committed October 28th). Now, I haven't looked at exactly how the code works, but it evidentally looks at the beginning of the file to detect it. You can use -a to override this of course. I'm not sending a PR or anything since this is 'arguable' on whether or not it's a bug or just being over sensitive. Here is an example of the output: FreeBSD 4.0-CURRENT (11NOV99): ============================== [chenresig@karma] chenresig> grep -V grep (GNU grep) 2.3 .. [root@karma] src> set|grep karma Binary file (standard input) matches [root@karma] src> set|head '!'=0 '#'=0 '$'=607 '*'=() -=569Xis 0=su '?'=0 @=() ARGC=0 FreeBSD 3.3-STABLE (09NOV99): ============================= grouper# grep -V GNU grep version 2.0 grouper# set|grep grouper DISPLAY=grouper:10.0 HOST=grouper.aquarium.rtci.com grouper# set|head '!'=0 '#'=0 '$'=2647 '*'=() -=569Xils 0=-zsh '?'=0 @=() ARGC=0 BAUD=38400 -- ====================================================================== thomas r. stromberg smtp://tstromberg@rtci.com assistant is manager / systems guru http://thomas.stromberg.org research triangle commerce, inc. finger://thomas@stromberg.org 'om mani pedme hung' pots://1.919.380.9771:3210 ================================================================[eof]= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message