public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* grep3.0 of cygwin changed treatment of CR/LF.
@ 2017-05-11  7:59 川崎 正貴
  2017-05-11 15:20 ` Marco Atzeri
  0 siblings, 1 reply; 2+ messages in thread
From: 川崎 正貴 @ 2017-05-11  7:59 UTC (permalink / raw)
  To: cygwin

I found a problem on grep 3.0 on command prompt of Windows10 with 64bit
cygwin.
It seems that treatment of CR/LF is changed.
I expect cygwin disposes of CR/LF.

grep 2.25(correct)
>uname -a
CYGWIN_NT-10.0 PCNAME 2.6.0(0.304/5/3) 2016-08-31 14:32 x86_64 Cygwin
>env LC_ALL=C grep --version
grep (GNU grep) 2.25
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and others, see
<http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
> echo rr/| grep '^.*\/$'
rr/
> echo rr/| gawk '/^.*\/$/'
rr/
> echo rr/| sed -ne '/^.*\/$/p'
rr/

grep 3.0(incorrect)
>uname -a
CYGWIN_NT-10.0 PCNAME 2.8.0(0.309/5/3) 2017-04-01 20:47 x86_64 Cygwin
>env LC_ALL=C grep --version
grep (GNU grep) 3.0
Packaged by Cygwin (3.0-2)
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and others, see
<http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
> echo rr/| grep '^.*\/$'
> echo rr/| gawk '/^.*\/$/'
> echo rr/| sed -ne '/^.*\/$/p'
> echo rr/>a.txt
> echo a.txt| grep '^.*\/$'
> cat a.txt| grep '^.*\/$'
> dos2unix a.txt
dos2unix: converting file a.txt to Unix format...
> echo a.txt| grep '^.*\/$'
> cat a.txt| grep '^.*\/$'
rr/
> cat a.txt| gawk '/^.*\/$/'
rr/
> cat a.txt| sed -ne '/^.*\/$/p'
rr/

thanks.


--
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: grep3.0 of cygwin changed treatment of CR/LF.
  2017-05-11  7:59 grep3.0 of cygwin changed treatment of CR/LF 川崎 正貴
@ 2017-05-11 15:20 ` Marco Atzeri
  0 siblings, 0 replies; 2+ messages in thread
From: Marco Atzeri @ 2017-05-11 15:20 UTC (permalink / raw)
  To: cygwin

On 11/05/2017 08:56, 川崎 正貴 wrote:
> I found a problem on grep 3.0 on command prompt of Windows10 with 64bit
> cygwin.
> It seems that treatment of CR/LF is changed.
> I expect cygwin disposes of CR/LF.
>

See announcement
https://sourceware.org/ml/cygwin-announce/2017-02/msg00035.html

use d2u to remove unwanted CR/LF sequence

Regards
Marco



--
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-11  9:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11  7:59 grep3.0 of cygwin changed treatment of CR/LF 川崎 正貴
2017-05-11 15:20 ` Marco Atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).