[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41004: Documentation:enhancement - search for hexvalue
From: |
Radisson97 |
Subject: |
bug#41004: 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
- bug#41004: Documentation:enhancement - search for hexvalue,
Radisson97 <=