bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50025: Strange? grep behaviour


From: Daniel Forsberg
Subject: bug#50025: Strange? grep behaviour
Date: Thu, 12 Aug 2021 10:27:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0

Hello fellow Grepers!

the following line:

echo -n "9999:egov" | sha256sum | grep -E "[0-9a-f]+" -o | xxd -r -p |
base32 | grep -E "[0-9A-Z]+" -o

produces the following output

LCBSPBBX6BY6
VZX6P6TZMMRETTCSPXZU7GJTAPPZCPKF2UJEYDA

expected output:

LCBSPBBX6BY6WVZX6P6TZMMRETTCSPXZU7GJTAPPZCPKF2UJEYDA

As you can see it removes a single 'W' and replaces it with a new line.

Running Gnu grep 3.6, zsh and Gnome Terminal

uname: Linux 5.13.9-arch1-1 #1 SMP PREEMPT Sun, 08 Aug 2021 11:25:35
+0000 x86_64 GNU/Linux

Tried bash as well with same result.

On macOs i get the expected result, a colleague running the same base os
on similar hwconfig computer but other device but with XFCE terminal
also gets expected result so this seems to be something particular to my
system but I have not been able to find why.

Everything looks the same up till the last grep. If I change the regexp
to \w+ I get the expected output.

Honestly, dont know if this is a bug or just something iffy on my device
but thought it might be better to contact you anyways to see if you can
reproduce this in any way



-- 
____________________________________
*Daniel Forsberg*
Developer at eGovlab

Department of Computer and Systems Sciences
*Stockholm University*
Postbox 7003, SE-164 07 Kista
Visiting address: Borgarfjordsgatan 12, Kista
https://egovlab.eu/
https://dsv.su.se
____________________________________

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]