delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/12/17/06:55:58

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:content-type:content-transfer-encoding
:mime-version:subject:message-id:date:to; q=dns; s=default; b=ps
SDiTPYSGjKJ7mYe9VyWpS1BEW6S9yjKavdc1opuSwVWYhr6ZoIOGSruOdKs8CJlH
GSoa7rYGX+FeFR6NXF5/I4cmn8c2y17Q2XnDphec5hI/yTIUwoQRKG/E8zqd5wuS
F++yJRbcOLwyt5YKaZuxbQ30hHai2vd1ViHusbWi4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:content-type:content-transfer-encoding
:mime-version:subject:message-id:date:to; s=default; bh=qpH0mHFe
JgFMTasaefUevfGG/j4=; b=B+QvglkUgIFmuVem0Igai79oyKgShefoCCdvGuif
AVEGjNAeDyQ5UGS4k4ZpQWCaCJVUeVxBj7IFXHHlOKY4QdepD+o/YVQj4NiUQ0bP
tmiNsgXaR+aZQ04b4vc7uJ2yOQ1hAIR8kOkJEDB9jMRN/tA7M1iEjvU7aC4Vd2J5
Rpc=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=1.8 required=5.0 tests=BAYES_50,FROM_EXCESS_BASE64,KAM_SHORT,SPF_PASS autolearn=no version=3.3.2 spammy=claiming, pure, sur, can
X-HELO: mx.pao1.isc.org
From: =?utf-8?B?T25kxZllaiBTdXLDvQ==?= <ondrej AT isc DOT org>
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
Subject: Re: grep 3.0-2 not stripping CRs on Windows
Message-Id: <BCB16CA2-0472-4566-B652-3951A2939FCE@isc.org>
Date: Mon, 17 Dec 2018 12:55:41 +0100
To: cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id wBHBtuwn030038

[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 AT isc DOT 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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019