Re: grep 3.0-2 not stripping CRs on Windows
- Date: Mon, 17 Dec 2018 12:55:41 +0100
- From: Ondřej Surý <ondrej@xxxxxxx>
- Subject: Re: grep 3.0-2 not stripping CRs on Windows
[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 through d2u (or tr -d ‘\r’) hardly makes cygwin usable to write platform agnostic scripts, right?
It is a regression from 2.27-2 version of the package:
$ grep --version
grep (GNU grep) 2.27
Packaged by Cygwin (2.27-2)
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 -e 'foo\r\n' | grep -a 'foo$'
And it also it contradicts from the documentation (manpage) bundled with the version.
I think it’s reasonable to classify this as a bug.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple