GNU bug report logs - #75806
Trailing spaces; pattern "\s" before "[[:cntrl:]]" faulty

Previous Next

Package: grep;

Reported by: Andreas BROCKMANN <andreas.brockmann <at> diehl.com>

Date: Fri, 24 Jan 2025 14:50:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Andreas BROCKMANN <andreas.brockmann <at> diehl.com>
Subject: bug#75806: closed (Re: bug#75806: Trailing spaces; pattern "\s"
 before "[[:cntrl:]]" faulty)
Date: Sat, 25 Jan 2025 19:32:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#75806: Trailing spaces; pattern "\s" before "[[:cntrl:]]" faulty

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 75806 <at> debbugs.gnu.org.

-- 
75806: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75806
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Andreas BROCKMANN <andreas.brockmann <at> diehl.com>
Cc: "cygwin <at> cygwin.com" <cygwin <at> cygwin.com>, 75806-done <at> debbugs.gnu.org
Subject: Re: bug#75806: Trailing spaces; pattern "\s" before "[[:cntrl:]]"
 faulty
Date: Sat, 25 Jan 2025 11:31:06 -0800
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.

[Message part 3 (message/rfc822, inline)]
From: Andreas BROCKMANN <andreas.brockmann <at> diehl.com>
To: "bug-grep <at> gnu.org" <bug-grep <at> gnu.org>
Cc: "cygwin <at> cygwin.com" <cygwin <at> cygwin.com>
Subject: Trailing spaces; pattern "\s" before "[[:cntrl:]]" faulty
Date: Fri, 24 Jan 2025 13:27:13 +0000
[Message part 4 (text/plain, inline)]
Hi,

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

grep -V
grep (GNU grep) 3.0
Packaged by Cygwin (3.0-2)
Copyright (C) 2017 Free Software Foundation, Inc.

cmd --help
Microsoft Windows [Version 10.0.19045.5371]
(c) Microsoft Corporation. All rights reserved.

Kind Regards
Brockmann

Andreas Brockmann, Dipl.-Ing.
Hardware Engineer
Strategic Business Segment Aircraft Systems
HW & Mech. Engineering & Config. Management

phone +49 7551 891 4104
andreas.brockmann <at> diehl.com | www.diehl.com/aviation

Diehl Aerospace GmbH
Alte Nussdorfer Strasse 23 | 88662 Ueberlingen | Germany

Diehl Aerospace is a Joint Diehl Thales Company

[cid:image001.png <at> 01DB6E6A.9AA98030]

Discover our product highlights!<https://www.highlights-diehlaviation.com/en/>

[cid:image002.png <at> 01DB6E6A.9AA98030]<https://twitter.com/diehlaviation>    [cid:image003.png <at> 01DB6E6A.9AA98030] <https://www.linkedin.com/company/13579979>

Save Paper! Think Before You Print.


Diehl Aerospace GmbH, Alte Nu?dorfer Stra?e 23, 88662 Ueberlingen, Deutschland/Germany

Sitz der Gesellschaft/registered office: Ueberlingen | Registergericht/Registry court: Freiburg, HRB 581408

Geschaeftsfuehrer/General management: Dipl.-Betr.-Wirt (BA) Florian Maier (Vorsitzender/CEO), Dipl.-Wirtsch.-Ing. Joerg Maeder, Dipl.-Kfm. Eric Gros

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht. Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie unter: https://www.diehl.com/group/de/transparenz-und-informationspflichten

The content of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.
For general information on data protection and your respective rights please visit: https://www.diehl.com/group/en/transparency-and-information-obligations


[Message part 5 (text/html, inline)]
[image001.png (image/png, inline)]
[image002.png (image/png, inline)]
[image003.png (image/png, inline)]

This bug report was last modified 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.