This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: grep 3.0-2 not stripping CRs on Windows
Dear Ondrej,
> # Use —text —> finds the text OK
Afaik -a / --text only suppresses this behavior (from man grep):
... when grep discovers that a file is binary it suppresses any further
output, and instead outputs either a one-line message saying that a binary file matches, or no message
if there is no match.
It does not influence if the file is opened as text or binary file. I agree that the documentation to -U in man grep explicitly says that if a file is a text file, CRs are stripped, so that is a documentation bug. This should be updated (as Corinna already suggested).
I still think that it would also make sense to:
- have for grep, sed and awk at least an option to strip CRs
- have an environment variable to make this option default
But otherwise I must admit that handling scripts intended for Unix works very well with Cygwin so the decision made appear to be good decisions, even if they are sometimes not what one wants.
Best regards,
Michael
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple