Re: grep 3.0-2 not stripping CRs on Windows

2018-12-17 Thread Andrey Repin
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

Re: grep 3.0-2 not stripping CRs on Windows

2018-12-17 Thread cyg Simple
On 12/17/2018 8:05 AM, Steven Penny wrote: On Mon, 17 Dec 2018 13:22:48, Ondřej Surý wrote: # No amount of options makes the grep find the text in the file $ ./grep-3.0-2.exe 'foo$’ crlf.txt $ ./grep-3.0-2.exe -U 'foo$' crlf.txt $ ./grep-3.0-2.exe -a 'foo$’ crlf.txt Your commands are failing

Re: grep 3.0-2 not stripping CRs on Windows

2018-12-17 Thread Steven Penny
On Mon, 17 Dec 2018 13:22:48, Ondřej Surý wrote: # No amount of options makes the grep find the text in the file $ ./grep-3.0-2.exe 'foo$’ crlf.txt $ ./grep-3.0-2.exe -U 'foo$' crlf.txt $ ./grep-3.0-2.exe -a 'foo$’ crlf.txt Your commands are failing because you are not accounding for the

RE: grep 3.0-2 not stripping CRs on Windows

2018-12-17 Thread Soegtrop, Michael
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

Re: grep 3.0-2 not stripping CRs on Windows

2018-12-17 Thread Ondřej Surý
Hi Michael, ah, there was a similar change for sed, that’s why I missed it when searching for the change. I believe this is slightly different case, as the pipes were only included in the example I sent. The grep fails to match CRLF to $ even if physical files are involved and `-a` option is

Re: grep 3.0-2 not stripping CRs on Windows

2018-12-17 Thread Corinna Vinschen
On Dec 17 12:55, Ondřej Surý wrote: > [Sorry, I am not subscribed, so I can’t add proper References: headers here.] > > > Cygwin is a POSIX platform not a pure Windows one. > > If you need to strip CR character, d2u of dos2unix package is the tool. > > I am not claiming that Cygwin is a pure

RE: grep 3.0-2 not stripping CRs on Windows

2018-12-17 Thread Soegtrop, Michael
Dear Ondrej, this has been discussed to quite some length and detail more than once on this list. The initial message of a lengthy discussion (> 30 replies) on the topic is here: https://www.cygwin.com/ml/cygwin/2017-06/msg00040.html Best regards, Michael Intel Deutschland GmbH Registered

Re: grep 3.0-2 not stripping CRs on Windows

2018-12-17 Thread Ondřej Surý
[Sorry, I am not subscribed, so I can’t add proper References: headers here.] > Cygwin is a POSIX platform not a pure Windows one. > If you need to strip CR character, d2u of dos2unix package is the tool. I am not claiming that Cygwin is a pure Windows platform, but having to run everything

Re: grep 3.0-2 not stripping CRs on Windows

2018-12-17 Thread Marco Atzeri
Am 17.12.2018 um 12:09 schrieb Ondřej Surý: Hi, the grep package in version 3.0-2 fails to strip CR characters from the input, the reproducer is fairly simple: ``` $ echo -e 'foo\r\n' | grep -a 'foo$' $ ``` Perhaps the grep fails to detect it’s running on Windows because of cygwin emulates