I have couple of files (file 1.txt and file2.txt) and I am using unix "comm" command to compare those files to find out unique lines on file1.txt
Here are the lines having on file1.txt:
OD1
EN2
OD3
OD4
OD5
EN6
EN7
EN8
EN9
OD10
OD11
OD12
Here are the lines having on file2.txt:
EN1
EN2
EN3
OD4
OD5
EN6
EN7
EN8
EN9
OD10
I am using the command as :
comm -23 file1.txt file2.txt
actual
The result is:
OD1
OD10
OD11
OD12
OD3
expecting
I was expecting:
OD1
OD11
OD12
OD3
Can you please help how to get the expected results?
... OD5 comm: file 2 is not in sorted order EN6 ...(this is taken from the right-most column). "comm - compare two sorted files line by line".commexpects the file to be sorted before inputting. Looks like both of your files are not sorted