From owner-freebsd-current Thu Nov 11 23:39:31 1999 Delivered-To: freebsd-current@freebsd.org Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [169.237.7.38]) by hub.freebsd.org (Postfix) with ESMTP id D47CD14A00 for ; Thu, 11 Nov 1999 23:39:20 -0800 (PST) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (root@d60-025.leach.ucdavis.edu [169.237.60.25]) by relay.nuxi.com (8.9.3/8.9.3) with ESMTP id XAA65310; Thu, 11 Nov 1999 23:39:10 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.9.3/8.9.1) id XAA61511; Thu, 11 Nov 1999 23:39:10 -0800 (PST) (envelope-from obrien) Date: Thu, 11 Nov 1999 23:39:10 -0800 From: "David O'Brien" To: Paul Eggert Cc: tstromberg@rtci.com, freebsd-current@freebsd.org, bug-gnu-utils@gnu.org Subject: Re: Bad 'grep' behaviour in -CURRENT, faulty binary detection? Message-ID: <19991111233909.A60558@dragon.nuxi.com> Reply-To: obrien@NUXI.com References: <382B2711.E13A1CC8@rtci.com> <19991111132031.A60417@dragon.nuxi.com> <199911120037.QAA06642@shade.twinsun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <199911120037.QAA06642@shade.twinsun.com>; from eggert@twinsun.com on Thu, Nov 11, 1999 at 04:37:08PM -0800 X-Operating-System: FreeBSD 4.0-CURRENT Organization: The NUXI BSD group X-PGP-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Keyid: 34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Please don't change the algorithm to deduce which files are binary. > It was the subject of much design discussion in the GNU project, and > is fairly consistent across other GNU applications. Sounds reasonable. > The -CURRENT grep is also very misleading w/ ``grep -l'' in that > you will get "hits" on binary files because you can't see that "is > a binary file" message to know better. > > I find it useful to see the names of all files matching the pattern. Yes, but I find saying all binary files match a pattern, weird. $ grep i /COPYRIGHT /kernel /COPYRIGHT:All of the documentation and software included in the ..snip.. Binary file /kernel matches Upto FreeBSD 4.0, we used Grep version 2.0 and added the "-a" which made grep ignore binary files. $ grep-2.0 -a i /COPYRIGHT /kernel /COPYRIGHT:All of the documentation and software included in the ..snip.. I prefere this and it just seems right to ignore binary files. But its not so bad since I can read the "Binary". But using the "-l" flag will give: $ grep -l i /COPYRIGHT /kernel /COPYRIGHT /kernel which I find very misleading. Would it be possible to either ignore binary files when "-l" is in affect. OR to add an ignore binary file flag (like FreeBSD has in 2.x and 3.x)? -- -- David (obrien@NUXI.com) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message