Subject: bug#75806: closed (Re: bug#75806: Trailing spaces; pattern "\s" before "[[:cntrl:]]" faulty)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 25 Jan 2025 19:32:02 +0000

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 [email-masked].

-- 
75806: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75806
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#75806: Trailing spaces; pattern "\s" before "[[:cntrl:]]" faulty
From: Paul Eggert <[email-masked]>
To: Andreas BROCKMANN <[email-masked]>
Cc: "[email-masked]" <[email-masked]>, [email-masked]
Date: Sat, 25 Jan 2025 11:31:06 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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.

Subject: Trailing spaces; pattern "\s" before "[[:cntrl:]]" faulty
From: Andreas BROCKMANN <[email-masked]>
To: "[email-masked]" <[email-masked]>
Cc: "[email-masked]" <[email-masked]>
Date: Fri, 24 Jan 2025 13:27:13 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

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
[email-masked] | www.diehl.com/aviation

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

Diehl Aerospace is a Joint Diehl Thales Company

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

<https://twitter.com/diehlaviation>     <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