This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: grep 3.0-2 not stripping CRs on Windows
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Ondřej Surý <ondrej at isc dot org>, cygwin at cygwin dot com
- Date: Mon, 17 Dec 2018 23:35:59 +0300
- Subject: Re: grep 3.0-2 not stripping CRs on Windows
- References: <B18A59DC-C4E8-4833-A619-B7A3367F40D2@isc.org>
- Reply-to: cygwin at cygwin dot com
Greetings, Ondřej Surý!
> the grep package in version 3.0-2 fails to strip CR characters from the
> input, the reproducer is fairly simple:
The change to not do text mode conversion any longer was delibrate and in line
with changes to other GNU tools.
> ```
> $ echo -e 'foo\r\n' | grep -a 'foo$'
> $
> ```
> Perhaps the grep fails to detect it’s running on Windows because of cygwin emulates Linux so well? :)
> This contradicts the manpage that says:
Man page refers to Windows and DOS native builds, while Cygwin is "a kinf od
Linux".
> And it’s a regression from previous behaviour, and unfortunately, this change breaks some existing scripts.
See above, the change was deliberate.
It affected sed, grep and probably diff/patch from what I can recall.
You can check list archives to find more information.
--
With best regards,
Andrey Repin
Monday, December 17, 2018 23:32:49
Sorry for my terrible english...