GNU bug report logs - #41004
Documentation:enhancement - search for hexvalue

Previous Next

Package: grep;

Reported by: Radisson97 <at> web.de

Date: Fri, 1 May 2020 17:07:01 UTC

Severity: wishlist

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: Radisson97 <at> web.de
Subject: bug#41004: closed (Re: bug#41004: Documentation:enhancement -
 search for hexvalue)
Date: Tue, 22 Sep 2020 03:26:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#41004: Documentation:enhancement - search for hexvalue

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 41004 <at> debbugs.gnu.org.

-- 
41004: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41004
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: Jim Meyering <jim <at> meyering.net>, Stephane Chazelas <stephane <at> chazelas.org>
Cc: 41004-done <at> debbugs.gnu.org, Radisson97 <at> web.de
Subject: Re: bug#41004: Documentation:enhancement - search for hexvalue
Date: Mon, 21 Sep 2020 20:25:15 -0700
[Message part 3 (text/plain, inline)]
I installed the attached doc patch, which I hope addresses the issues mentioned 
in this bug report, and am boldly closing the bug report.
[0001-doc-say-how-to-match-chars-by-code.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Radisson97 <at> web.de
To: bug-grep <at> gnu.org
Subject: Documentation:enhancement - search for hexvalue
Date: Fri, 1 May 2020 19:05:28 +0200
Hi,
i had the problem of searching for a non-printable character in a long
list of strings. I found nothing the documentation and but several discussion
how to do that where either complicated or did not fit for my case, maybe i
was unlucky, ntl i found a simple solution that should be mentioned in the
documentation.

problem: grep for a character where only the hexcode in known.

solution:        use $'\xNN'
                     then shell expands this to the required code

example:       printf "A\nB\nC\n" | grep $'\x41'

note: that uses only printable characters, it works also with anything else
         except \0 (i guess).

i found that solution nice, it did no require any flags etc, for my problem it
worked like a charm.
(i am not member of the list please reply directly to this address) .

hope that helps,
 radisson



This bug report was last modified 4 years and 245 days ago.

Previous Next


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