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: Sun, 15 Aug 2021 20:31:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0

wow!

nice find Simon.

Thnx!

On 2021-08-15 16:27, Simon Josefsson wrote:
> Daniel Forsberg <daniel.forsberg@dsv.su.se> writes:
>
>> 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
> This is because W is not part of the Swedish collate class, so A-Z does
> not match W, for some strange reason -- I think this has been changed in
> recent glibc though.
>
> jas@latte:~$ LANG=sv_SE.UTF-8
> jas@latte:~$ echo -n "9999:egov" | sha256sum | grep -E "[0-9a-f]+" -o | xxd 
> -r -p | base32 | grep -E "[0-9A-Z]+" -o
> LCBSPBBX6BY6
> VZX6P6TZMMRETTCSPXZU7GJTAPPZCPKF2UJEYDA
> jas@latte:~$ LANG=C
> jas@latte:~$ echo -n "9999:egov" | sha256sum | grep -E "[0-9a-f]+" -o | xxd 
> -r -p | base32 | grep -E "[0-9A-Z]+" -o
> LCBSPBBX6BY6WVZX6P6TZMMRETTCSPXZU7GJTAPPZCPKF2UJEYDA
> jas@latte:~$ 
>
> /Simon
-- 
____________________________________
*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
____________________________________


reply via email to

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