I want to use Comm to compare two log files. The files are around 1MB containing ~10.000 lines.
While testing with a small portion of a log
comm -1 -3 a.log b.log > diff.log
worked as expected.
However when testing with the full file I got the following message; comm: file 2 is not in sorted order
.
When adding --nocheck-order
to the command seems to work but why is this necessary? The man page doesn't really offer any insight. I just want to be sure my script outputs the correct data. I don't care in what order the logs are processed as long as it only outputs the lines that only exist in the second file.
Asked by sjaak
(644 rep)
Feb 22, 2021, 06:40 AM