Date: Mon, 7 Feb 2005 18:02:18 -0800 From: "Michael C. Shultz" <reso3w83@verizon.net> To: freebsd-questions@freebsd.org Cc: Anthony Atkielski <atkielski.anthony@wanadoo.fr> Subject: Re: Another grep question Message-ID: <200502071802.19719.reso3w83@verizon.net> In-Reply-To: <1667502496.20050208025619@wanadoo.fr> References: <1667502496.20050208025619@wanadoo.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502071802.19719.reso3w83>