Another grep question
    Michael C. Shultz 
    reso3w83 at verizon.net
       
    Mon Feb  7 18:06:24 PST 2005
    
    
  
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
    
    
More information about the freebsd-questions
mailing list