delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/11/16/11:54:36

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0D206395BC24
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=towo.net
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo.net
Message-ID: <965e2dff-f624-21f5-90b7-62fb9fbbc6a2@towo.net>
Date: Wed, 16 Nov 2022 17:53:09 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.2
Subject: Re: --text option of grep v3.7-2 not working
To: cygwin AT cygwin DOT com
References: <20221116125047 DOT xmrb6zmkmepoxbiv AT math DOT berkeley DOT edu>
From: Thomas Wolff <towo AT towo DOT net>
In-Reply-To: <20221116125047.xmrb6zmkmepoxbiv@math.berkeley.edu>
X-Provags-ID: V03:K1:Ec4l/SS0OkMxWGoWz3D++Af2FXR8bgvRm/M0Mqew/msZhfWqpdC
3t+USJNKC3s616/+Yzil82bvq/6omT41mrh+NA5QOD1Q2Ev14h6uXc707W1tsqj8ANij9AP
sgvMBOMInfMTPnk9cHgTooDjlCY8fESccX8hCJFMKv3/2aJbxkFjBLG9syZqiRoWfrBunaJ
bylJtXJGbGf3qYOiekiiQ==
X-UI-Out-Filterresults: notjunk:1;V03:K0:XRqvx6+o8sk=:H7WrAgWCuBcxDYFJXivGdH
O4w5VVU74KRbsiTD03YEdyhcfqkgGnDwgYCE55WsT/Zn+RgRsZblK0sur1QqRBVY87GdBNvoD
MVg+fX81XJWVZmH/VBYAbGupXAnCahDMRfhhMP3JtWoyTBG2o6Wk9gFJ8Vlvj4IZKDfyMlrVn
D4uow/LBfMWsw1Gw79BBhf4SJxJSRK01lLNB0aETFraXBlRuZd/wceki8NToB9yPVhXqzCuX9
FuahaMWyALy+HyQ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wC6kO7Dpj
X+eVa0Qs
X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00, BODY_8BITS,
KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE,
RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE,
TXREP autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 2AGGsIc6018877


Am 16/11/2022 um 13:50 schrieb Ilya Zakharevich:
> grep with -a (or --text) option does not strip CR from line ends
>
> 	Broken in: CYGWIN_NT-6.1     Bu 3.3.4(0.341/5/3) 2022-01-31 19:35 x86_64 Cygwin
> 	       	   grep (GNU grep) 2.21
>
> 	Works  in: CYGWIN_NT-6.1-WOW Bu 2.2.1(0.289/5/3) 2015-08-20 11:40 i686   Cygwin
> 	       	   grep (GNU grep) 3.7
> 	       	   Packaged by Cygwin (3.7-2)
>
> To reproduce, do in CMD’s command line:
>
>    D:\> D:\Programs\cygwin2022\bin\perl -we "print qq(abc\r\n)" | D:\Programs\cygwin2022\bin\grep -a "abc$"
>
> This does not emit anything (contrary to the man page, which says:
>
>        If grep decides the file is a text file, it strips the CR
>        characters from the original file contents (to make regular
>        expressions with ^ and $ work correctly).
This section in the manpage is preceded by
      By default, under MS-DOS  and  MS-Windows,  grep  guesses whether  
a  file  is  text or binary as described for the --binary-files option.
which may be interpreted so that this stripping only occurs in the 
DOS/Windows versions, which the cygwin version isn't.
If you think this is unclear, as the Linux version behaves the same way, 
you should report this upstream.

>
> (The same happens on Win10.)
>
> Hope this helps,
> Ilya
>
> P.S.  It seems that the mailing list does not allow attaching the output!
>          So I retry with a shortened version…
>



-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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