Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Nov 1999 15:29:05 -0500
From:      Thomas Stromberg <tstromberg@rtci.com>
To:        freebsd-current@freebsd.org, bug-gnu-utils@gnu.org
Subject:   Bad 'grep' behaviour in -CURRENT, faulty binary detection?
Message-ID:  <382B2711.E13A1CC8@rtci.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?382B2711.E13A1CC8>