delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/12/17/15:50:19

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:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=Iw9XPqGUi+9Qr+4w
T+Xfpd2OUiaIywE0eJAyCW6/5pq2yuTkcOL8hcLYj7L+8qQoJnZUedNb5LFIbEZm
JzGvuHKXfZPv5dlkn0OuhLHKlVOFIAE++zvSyK9HEwkS0aGNG3YWtLyU37vA7aY2
+N7fvfoVChVDPbU6pdpzBriQjXA=
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:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=iHREFaPCLxiu4JBqOW0U2X
KcPe8=; b=FzVjODc0GuO0atZAoOtuC9LpL1wnbZo++1KrLfCKUukxbiCsJ8kJgl
b47wUmCHcNSZiBxDgeM/7nNXpphGLodkmWGMxwLFeU+DcXstFMinXLDo2ZOQh2O0
wZQDWU/3l/llnCmnOtvCygWQ8HE+hzSRye5q675flvxMafufVswgY=
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=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_THEBAT,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*RU:192.168.1.10, H*r:ip*192.168.1.10, Hx-spam-relays-external:192.168.1.10, H*r:Client
X-HELO: forward104o.mail.yandex.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1545079802; bh=18PJpbblIIQhkCLWHtjDP5u/8K+sWYXY/sXKvHfuOlQ=; h=Date:From:Reply-To:Message-ID:To:Subject:In-Reply-To:References; b=SK6kQiiD/QJ2ScCwrXv0SfL46QSUxwUi9dud7y692AdxBEAMpqDefn/XvMZ3GDWaN zgUiYDbG/Cy1n5+IC19ADcwr2jCwG8vYOgDjB3SRrbsLW5W2AfGLPSZi8KvZGODlYn eC9xK0E2YO2qkwRN9Npt+n5piaQGfJx+/uPee5Hg=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1545079801; bh=18PJpbblIIQhkCLWHtjDP5u/8K+sWYXY/sXKvHfuOlQ=; h=Date:From:Reply-To:Message-ID:To:Subject:In-Reply-To:References; b=CE1L3VEv+ClTmdHxaxyscTin+JyS37Wt3Era99O01rBwA0kMFd9DhzsuJ9pQkBbJl iDzD0CbTDHsAXdd2WDJYwUCeSp13kgPuZ41SEoBhBKEKRCAZMahZx0S3wLgzvrAiHW DQQ+to1/GFCdp9Qp4InShOQGJOFJAhACfgV/JCCg=
Authentication-Results: smtp1p.mail.yandex.net; dkim=pass header.i=@yandex.ru
Date: Mon, 17 Dec 2018 23:35:59 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <791265280.20181217233559@yandex.ru>
To: =?utf-8?Q?Ond=C5=99ej_Sur=C3=BD?= <ondrej AT isc DOT org>, cygwin AT cygwin DOT com
Subject: Re: grep 3.0-2 not stripping CRs on Windows
In-Reply-To: <B18A59DC-C4E8-4833-A619-B7A3367F40D2@isc.org>
References: <B18A59DC-C4E8-4833-A619-B7A3367F40D2 AT isc DOT org>
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id wBHKoHCq019659

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 'foo$'
> $
> ```

> Perhaps the grep fails to detect it’s running on Windows because of cygwin emulates Linux so well? :)

> This contradicts the manpage that says:

Man page refers to Windows and DOS native builds, while Cygwin is "a kinf od
Linux".

> And it’s a regression from previous behaviour, and unfortunately, this change breaks some existing scripts.

See above, the change was deliberate.
It affected sed, grep and probably diff/patch from what I can recall.
You can check list archives to find more information.


-- 
With best regards,
Andrey Repin
Monday, December 17, 2018 23:32:49

Sorry for my terrible english...
--
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