From owner-freebsd-current Tue Jan 18 8: 4:18 2000 Delivered-To: freebsd-current@freebsd.org Received: from relay.ucb.crimea.ua (UCB-Async4-CRISCO.CRIS.NET [212.110.129.130]) by hub.freebsd.org (Postfix) with ESMTP id 0FB2A14CA4 for ; Tue, 18 Jan 2000 08:03:53 -0800 (PST) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.9.3/8.9.3/UCB) id SAA61307; Tue, 18 Jan 2000 18:04:44 +0200 (EET) (envelope-from ru) Date: Tue, 18 Jan 2000 18:04:44 +0200 From: Ruslan Ermilov To: Ben Rosengart Cc: current@FreeBSD.org Subject: Re: HEADS UP: grep 2.4a is now in the tree Message-ID: <20000118180444.A58470@relay.ucb.crimea.ua> Mail-Followup-To: Ben Rosengart , current@FreeBSD.org References: <20000118120001.A60039@relay.ucb.crimea.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: ; from Ben Rosengart on Tue, Jan 18, 2000 at 11:00:43AM -0500 X-Operating-System: FreeBSD 3.3-STABLE i386 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Jan 18, 2000 at 11:00:43AM -0500, Ben Rosengart wrote: > On Tue, 18 Jan 2000, Ruslan Ermilov wrote: > > > --binary-files='text' treats binary files as text > > (equivalent to -a or --text). > > So "-a" now does the opposite of what it used to do? > Not exactly. A stock grep 2.0 did not distinguish between binary and text files. So we (FreeBSD) added -a option, which caused grep to skip binary files. A stock grep 2.3 intoduced a stock -a option. By default, grep 2.3 prints a one-line message "Binary file FOO matches" (if it really matches). Grep 2.4 introduces a --binary-files option, which could be used to either 1) print a one-line message, if files matches; 2) treat the binary files as text files; 3) skip binary files. The equivalent to the old -a option is --binary-files=without-match. If you want this by default, you can hardcode it in GREP_OPTIONS environment variable. For a full story, see src/gnu/usr.bin/grep/NEWS. Cheers, -- Ruslan Ermilov Sysadmin and DBA of the ru@ucb.crimea.ua United Commercial Bank, ru@FreeBSD.org FreeBSD committer, +380.652.247.647 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message