From andrew@house.key.net.au Tue Jun 16 04:34:05 1998 Received: from house.key.net.au (andrew@house.key.net.au [203.35.4.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA20739 for ; Tue, 16 Jun 1998 04:34:02 -0700 (PDT) (envelope-from andrew@house.key.net.au) Received: (from andrew@localhost) by house.key.net.au (8.8.8/8.8.8) id VAA24318; Tue, 16 Jun 1998 21:34:32 +1000 (EST) (envelope-from andrew) Message-Id: <199806161134.VAA24318@house.key.net.au> Date: Tue, 16 Jun 1998 21:34:32 +1000 (EST) From: andrew@ugh.net.au Reply-To: andrew@ugh.net.au To: FreeBSD-gnats-submit@freebsd.org Subject: grep -a dosn't work X-Send-Pr-Version: 3.2 >Number: 6965 >Category: gnu >Synopsis: grep -a dosn't work >Confidential: no >Severity: non-critical >Priority: medium >Responsible: wosch >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 16 04:40:01 PDT 1998 >Closed-Date: Mon Feb 8 11:54:09 PST 1999 >Last-Modified: Mon Feb 8 11:55:17 PST 1999 >Originator: Andrew >Release: FreeBSD 2.2.6-STABLE i386 >Organization: UgH! >Environment: 2.2.6-STABLE #0: Mon May 25 >Description: grep -a -R mt * flashed my terminal, even though it shouldn't have searched binary files. I had a look at the source to grep to see how it determined which files were binary and it seemed fine so I dont offer a solution...just a complaint :-) Hopefully someone out there will no how to fix it. I guess I'll just have to avoid binary files prefaced by 32 prinatble characters :-) >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: From: Ruslan Ermilov To: andrew@ugh.net.au, FreeBSD-gnats-submit@FreeBSD.ORG Cc: Subject: Re: gnu/6965: grep -a dosn't work Date: Tue, 16 Jun 1998 15:10:37 +0300 On Tue, Jun 16, 1998 at 09:34:32PM +1000, andrew@ugh.net.au wrote: > > grep -a -R mt * flashed my terminal, even though it shouldn't have searched > binary files. I had a look at the source to grep to see how it determined which > files were binary and it seemed fine so I dont offer a solution...just a > complaint :-) Hopefully someone out there will no how to fix it. I guess I'll > just have to avoid binary files prefaced by 32 prinatble characters :-) > I was unable to reproduce this on my -stable system: # file `grep -a -l -R Id /usr/bin` /usr/bin/cvsbug: Bourne shell script text /usr/bin/zgrep: Bourne shell script text /usr/bin/zegrep: Bourne shell script text /usr/bin/zfgrep: Bourne shell script text /usr/bin/apropos: Bourne shell script text /usr/bin/whatis: Bourne shell script text /usr/bin/makewhatis: perl commands text /usr/bin/catman: perl commands text /usr/bin/rcsfreeze: Bourne shell script text /usr/bin/send-pr: Bourne shell script text /usr/bin/sendbug: Bourne shell script text /usr/bin/cpp: Bourne shell script text /usr/bin/groups: Bourne shell script text /usr/bin/whoami: Bourne shell script text /usr/bin/keyinfo: setuid a /usr/bin/suidperl script text /usr/bin/killall: perl commands text /usr/bin/mkdep: Bourne shell script text /usr/bin/pagesize: Bourne shell script text /usr/bin/whereis: perl commands text /usr/bin/which: perl commands text /usr/bin/lp: Bourne shell script text /usr/bin/ibcs2: Bourne shell script text /usr/bin/joy: Bourne shell script text /usr/bin/linux: Bourne shell script text /usr/bin/qcam: Bourne shell script text /usr/bin/c89: Bourne shell script text -- Ruslan Ermilov System Administrator ru@ucb.crimea.ua United Commercial Bank +380-652-247647 Simferopol, Crimea 2426679 ICQ Network, UIN From: Andrew To: Ruslan Ermilov Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: gnu/6965: grep -a dosn't work Date: Tue, 16 Jun 1998 23:00:50 +1000 ># file `grep -a -l -R Id /usr/bin` >/usr/bin/cvsbug: Bourne shell script text >/usr/bin/c89: Bourne shell script text Hey, I get usr/bin/file: Argument list too long. :-) Reducing the list of files I'm grepping does produce this: work/irc/ircii-EPIC4pre1.201/script/events: Composer 669 Module sound data but thats a bug in file as it is ircii script and defintley text. Using: file `grep -a -l -R e bind8` | egrep -v "text|PostScript" I get: bind8/work/src/lib/libbind.a: current ar archive random library and I would guess thats the file doing the nasty work. If anyone wants a copy I can put it up for FTP or just go grab the bind8 port :-) Andrew Responsible-Changed-From-To: freebsd-bugs->wosch Responsible-Changed-By: wosch Responsible-Changed-When: Wed Aug 12 01:13:13 PDT 1998 Responsible-Changed-Why: I added the -a option to grep. State-Changed-From-To: open->closed State-Changed-By: wosch State-Changed-When: Mon Feb 8 11:54:09 PST 1999 State-Changed-Why: `grep -a' has a *simply* heuristic to detect binary files. The heuristic works fine for most files. There is no warranty that it will work for all cases. >Unformatted: