bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep RFE: End-of-Line choices


From: Paul Eggert
Subject: Re: grep RFE: End-of-Line choices
Date: 01 Mar 2004 12:45:41 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Claudio Fontana <address@hidden> writes:

> I would suggest not to make grep automatically distinguish between
> text and binary files looking at the first few bytes and instead
> default to text and use a switch to force binary interpretation.

But this would render "grep -r" essentially useless in a directory
containing both text and binary files.  Let's not do this, please.

Also, POSIX does not permit the sort of "autodetection" on input that
is being proposed here, as a default behavior for "grep".  That is
because POSIX specifies the behavior of "grep" on text files, and it
says that text files can contain CR characters which are treated like
any other characters.

Adding a CRLF autodetection option to "grep" would conform to POSIX,
as long as this isn't the default behavior.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]