DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 50PJVYfL999300
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 50PJVYfL999300
Authentication-Results: delorie.com;
	dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=Rzcgk3iU
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E983385841F
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1737833493;
	bh=2NFKDNIt1zQL5oqagoZQgrZVdnX5G7SAvooL1I5lx+s=;
	h=Date:Subject:To:Cc:References:In-Reply-To:List-Id:
	 List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
	 From:Reply-To:From;
	b=Rzcgk3iURuxdFTWj4vq2ot8sU48KMgrT2GUxoK7fBetQGHUfEWYYT1KTnyDLxNJIZ
	 vDsqBYr0ksBaDkcsyPx+76G1R9R1WftWyT0yBugS4KEHptC1lQJnU6tkNZ+axfqFmm
	 zIvzTOsKFozdakUmNHgdMWtDxi+c4FsIVBXlRhgg=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 408623858C31
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 408623858C31
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1737833468; cv=none;
 b=vCOJReWNbh+A747FHZ3yaw4SFP+gE148LmdvC3eElN/YdQmYHI9Sx71UD5eiwkLJxDQsds/BVpyuQVIu3zZ1/GfFLQxmduVFUIwLpjOd7lFque/WgEUwwoHs9sRM73NpGh/x2O8cpb0bkV+eR6ZdgVt/E/QjPH/yf0d1QAevNQA=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1737833468; c=relaxed/simple;
 bh=M5843HvE8PJc1s0kAFU8DZHe+32bGcTjOjs/h4im5VU=;
 h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;
 b=VC+v6X18qC63lPIFIjXOMEoQKFrpNaHC6kAgdLZ0E4qQ4m3RyojKgQXczZd5TOg8P6ql9dlWOTMDT3IgRNIvrnRbF+2j4kUkDjixXjQ1WnItDpIn19phObG2pJIc4cQRX1ovpFHooZAZoKOrFsdvVbkbg+dD5USlV4u9nJ55/JI=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 408623858C31
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu A8A673C12386A
X-Virus-Scanned: amavis at mail.cs.ucla.edu
Message-ID: <bfdbce48-47d3-4d52-a359-dd962a319034@cs.ucla.edu>
Date: Sat, 25 Jan 2025 11:31:06 -0800
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#75806: Trailing spaces; pattern "\s" before "[[:cntrl:]]"
 faulty
To: Andreas BROCKMANN <andreas.brockmann@diehl.com>
Cc: "cygwin@cygwin.com" <cygwin@cygwin.com>, 75806-done@debbugs.gnu.org
References: <ad4ae696207443f284d8700791d989ed@diehl.com>
Content-Language: en-US
Organization: UCLA Computer Science Department
In-Reply-To: <ad4ae696207443f284d8700791d989ed@diehl.com>
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Paul Eggert via Cygwin <cygwin@cygwin.com>
Reply-To: Paul Eggert <eggert@cs.ucla.edu>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: cygwin-bounces~archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>

On 2025-01-24 05:27, Andreas BROCKMANN via Bug reports for GNU grep wrote:
> The 1st command below correctly reports trailing spaces, for Unix and Windows format files.
> The 2nd one incorrectly reports all lines.
> 
>    grep -sHn -i " [[:cntrl:]]*$" *.vhd
>    grep -sHn -i "\s[[:cntrl:]]*$" *.vhd

I don't see a bug. The latter command is equivalent to:

    grep -Hins '[[:space:]][[:cntrl:]]*$' *.vhd

and if the input files use Microsoft CRLF format then [[:space:]] 
matches the CR at the end of every line and [[:cntrl:]]* matches the 
empty string after the CR.

Possibly you need to use Unix LF format, or use the --text option, or 
something like that.

Marking the bug as done.

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