From owner-freebsd-questions@FreeBSD.ORG Tue Feb 8 02:06:24 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04D3116A4CE for ; Tue, 8 Feb 2005 02:06:24 +0000 (GMT) Received: from out002.verizon.net (out002pub.verizon.net [206.46.170.141]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71A9643D45 for ; Tue, 8 Feb 2005 02:06:23 +0000 (GMT) (envelope-from reso3w83@verizon.net) Received: from ringworm.mechee.com ([4.26.84.7]) by out002.verizon.net ESMTP <20050208020622.TSRM26937.out002.verizon.net@ringworm.mechee.com>; Mon, 7 Feb 2005 20:06:22 -0600 Received: by ringworm.mechee.com (Postfix, from userid 1001) id 3508A2CE747; Mon, 7 Feb 2005 18:02:20 -0800 (PST) From: "Michael C. Shultz" To: freebsd-questions@freebsd.org Date: Mon, 7 Feb 2005 18:02:18 -0800 User-Agent: KMail/1.7.2 References: <1667502496.20050208025619@wanadoo.fr> In-Reply-To: <1667502496.20050208025619@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200502071802.19719.reso3w83@verizon.net> X-Authentication-Info: Submitted using SMTP AUTH at out002.verizon.net from [4.26.84.7] at Mon, 7 Feb 2005 20:06:22 -0600 cc: Anthony Atkielski Subject: Re: Another grep question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2005 02:06:24 -0000 On Monday 07 February 2005 05:56 pm, Anthony Atkielski wrote: > Does anyone know why > > grep -R "\0x93" /www/htdocs > > turns up only binary files, even when I know there are text files in > the directory that contain this character? Is there something > special about the way I specify the search string that causes grep to > behave differently? When I specify an 8-bit character like this > alone for a search, it finds only binary files, even though this is a > text character--as if it is looking at the search string and deciding > that I want to search only binary files. > > The man page doesn't seem to say anything about this. Is it my > imagination? I made a text file named test.log containing: aj[[CFPWJJVCVMLKFD aj[[CFPWJJVCVMLKFD aj[[CFPWJJVCVMLKFD aj[[CFPWJJVCVMLKFD grep -R "\0x93" /www/htdocs aj[[CFPWJJVCVMLKFD aj[[CFPWJJVCVMLKFD aj[[CFPWJJVCVMLKFD aj[[CFPWJJVCVMLKFD aj[[CFPWJJVCVMLKFD aj[[CFPWJJVCVMLKFD aj[[CFPWJJVCVMLKFD aj[[CFPWJJVCVMLKFD aj[[CFPWJJVCVMLKFD the result of: grep -R "\0x93" test.log is: grep -R "\0x93" /www/htdocs Maybe you should test again???? -Mike