[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep RFE: End-of-Line choices
From: |
Stepan Kasal |
Subject: |
Re: grep RFE: End-of-Line choices |
Date: |
Fri, 27 Feb 2004 13:50:31 +0100 |
User-agent: |
Mutt/1.4.1i |
Hello,
On Fri, Feb 27, 2004 at 03:29:58AM -0800, Mabry Tyson wrote:
> I would urge you to make grep be general purpose and agnostic about a
> file's OS of origin.
thank you for explaining me.
Would you be so kind to advice me how should the autodecetion look like,
to be effective enough for inclusion into the default (unix) build?
What about the following: find first occurences of '\n' and '\r' in the
buffer. If they form "\r\n", we have a DOS file, if no "\n" was found
and "\r" was found, we have a Mac file, Unix file otherwise.
If neither \n nor \r was find, extend the buffer and recurse.
Would this work?
Stepan Kasal
- grep RFE: End-of-Line choices, Mabry Tyson, 2004/02/25
- Re: grep RFE: End-of-Line choices, Stepan Kasal, 2004/02/26
- Re: grep RFE: End-of-Line choices, Claudio Fontana, 2004/02/26
- Re: grep RFE: End-of-Line choices, Stepan Kasal, 2004/02/27
- Re: grep RFE: End-of-Line choices, Mabry Tyson, 2004/02/27
- Re: grep RFE: End-of-Line choices, Eli Zaretskii, 2004/02/27
- Re: grep RFE: End-of-Line choices, Stepan Kasal, 2004/02/27
- Re: grep RFE: End-of-Line choices, Eli Zaretskii, 2004/02/27
- Re: grep RFE: End-of-Line choices,
Stepan Kasal <=
- Re: grep RFE: End-of-Line choices, Claudio Fontana, 2004/02/27