public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Ondřej Surý" <ondrej@isc.org>
To: cygwin@cygwin.com
Subject: Re: grep 3.0-2 not stripping CRs on Windows
Date: Mon, 17 Dec 2018 11:55:00 -0000	[thread overview]
Message-ID: <BCB16CA2-0472-4566-B652-3951A2939FCE@isc.org> (raw)

[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$'
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.

Ondrej
--
Ondřej Surý
ondrej@isc.org


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

             reply	other threads:[~2018-12-17 11:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 11:55 Ondřej Surý [this message]
2018-12-17 12:04 ` Soegtrop, Michael
2018-12-17 12:22   ` Ondřej Surý
2018-12-17 12:51     ` Soegtrop, Michael
2018-12-17 13:05     ` Steven Penny
2018-12-17 15:38       ` cyg Simple
2018-12-17 12:09 ` Corinna Vinschen
  -- strict thread matches above, loose matches on Subject: below --
2018-12-17 11:10 Ondřej Surý
2018-12-17 11:41 ` Marco Atzeri
2018-12-17 23:37 ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BCB16CA2-0472-4566-B652-3951A2939FCE@isc.org \
    --to=ondrej@isc.org \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).