Bug 199807 - comm incorretly report common and different lines
Summary: comm incorretly report common and different lines
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.1-STABLE
Hardware: amd64 Any
: --- Affects Many People
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-30 12:46 UTC by slw
Modified: 2023-01-24 16:44 UTC (History)
1 user (show)

See Also:


Attachments
first file to compare (1.41 KB, text/plain)
2015-04-30 12:46 UTC, slw
no flags Details
second file to compare (1.45 KB, text/plain)
2015-04-30 12:47 UTC, slw
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description slw 2015-04-30 12:46:37 UTC
Created attachment 156145 [details]
first file to compare

comm incorretly report common and different lines: common lines independly reported as present only in file1 and also only in file2
Comment 1 slw 2015-04-30 12:47:28 UTC
Created attachment 156146 [details]
second file to compare
Comment 2 Fernando Apesteguía freebsd_committer 2023-01-24 16:44:49 UTC
As the comm(1) man page states, the files should be sorted lexicographically. The example files are not. If they are sorted with sort(1), the result is the expected one as far as I can tell.