grep 3.0-2 not stripping CRs on Windows

Andrey Repin anrdaemon@yandex.ru
Mon Dec 17 23:37:00 GMT 2018


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...B‹KCB”›Ø›[H™\ܝΈ‹ËØÞYÝÚ[‹˜ÛÛKܛ؛[\Ëš[B‘TNˆ‹ËØÞYÝÚ[‹˜ÛÛKÙ˜\KÃB‘ØÝ[Y[][ÛŽˆ‹ËØÞYÝÚ[‹˜ÛÛKÙØÜËš[B•[œÝXœØÜšX™H[™›Îˆ‹ËØÞYÝÚ[‹˜ÛÛKÛ[ÈÝ[œÝXœØÜšX™K\Ú[\CBƒB


More information about the Cygwin mailing list