Re: grep 3.0-2 not stripping CRs on Windows
- Date: Mon, 17 Dec 2018 23:35:59 +0300
- From: Andrey Repin <anrdaemon@xxxxxxxxx>
- Subject: Re: grep 3.0-2 not stripping CRs on Windows
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
> 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,
Monday, December 17, 2018 23:32:49
Sorry for my terrible english...