Subject: bug#48171: Possible Bug in comm 8.32

From: Pádraig Brady <[email-masked]>
Date: Sun, 2 May 2021 22:14:09 +0100

tag 48171 notabug
close 48171
stop

On 02/05/2021 19:54, Jon Forrest wrote:
> This is on Fedora 34 server.
> 
> $ uname -a
> Linux fedora 5.11.16-300.fc34.x86_64 #1 SMP Wed Apr 21 13:18:33 UTC 2021
> x86_64 x86_64 x86_64 GNU/Linux
> 
> $ comm --version
> comm (GNU coreutils) 8.32
> 
> Consider the 2 attached files f1.txt and f2.txt. They're already sorted.
> 
> $ comm -12 f1.txt f2.txt
> 1O55
> 1O56
> 
> This means that 1055 and 1056 are in both files. However, this isn't
> true.
> 
> $ fgrep 1055 f1.txt f2.txt
> f1.txt:1055
> $ fgrep 1056 f1.txt f2.txt
> f1.txt:1056
> 
> Note that these lines are only in f1.txt. This looks like
> a bug.
> 
> Please advise.

Your input data looks incorrect.
There is a mixup between the letter O and digit 0.
The following should be instructive:

$ grep 1O5[56] f[12].txt
f1.txt:1O55
f1.txt:1O56
f2.txt:1O55
f2.txt:1O56

cheers,
Pádraig