Another grep question
Giorgos Keramidas
keramida at linux.gr
Mon Feb 7 18:12:38 PST 2005
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.
It may not be related to what you are seeing, but grep(1)
is locale-aware. What it considers a "text" character
depends on the current locale settings.
In my account, which has a Greek locale setup, it will
consider all Greek 8-bit characters as text.
This e-mail and any attachments may contain confidential and
privileged information. If you are not the intended recipient,
please notify the sender immediately by return e-mail, do not forward
this email to any other person, delete this
e-mail and destroy all copies. Any dissemination or use of this
information by a person other than the intended recipient is
unauthorized and may be illegal.
More information about the freebsd-questions
mailing list