I learned here how to use comm to compare 2 already sorted (using sort) files and display lines/records present in either one of the files or in both of them.
Something is actually not really working as expected so I wanted to get some help. Let's say I have a couple of sorted files that have about ~200k records each and some of those lines are common - appear in both files previously sorted. then execute this command: comm -i -23 file1 file2 > test_01 very simple. the expectation being to have records/lines in test_01 that *only* show up in file1. but the output - test_01 - contains lines/records that are present in both files. Both files contain just plain email addresses - one column each. and previously sorted, as mentioned above, with the sort utility. each file has different amounts of records. did confirm (using grep) that the test_01 output file contains records present in both file1 and file2. based on the above process description is there something that i'm doing wrong?
Something is actually not really working as expected so I wanted to get some help. Let's say I have a couple of sorted files that have about ~200k records each and some of those lines are common - appear in both files previously sorted. then execute this command: comm -i -23 file1 file2 > test_01 very simple. the expectation being to have records/lines in test_01 that *only* show up in file1. but the output - test_01 - contains lines/records that are present in both files. Both files contain just plain email addresses - one column each. and previously sorted, as mentioned above, with the sort utility. each file has different amounts of records. did confirm (using grep) that the test_01 output file contains records present in both file1 and file2. based on the above process description is there something that i'm doing wrong?
Asked by darwingoat
(1 rep)
Dec 22, 2023, 03:24 PM
Last activity: Dec 23, 2023, 11:01 AM
Last activity: Dec 23, 2023, 11:01 AM