perl - Comparing contents of files -


i have 2 tab delimited files of 15 columns each , n , m number of rows.

the number of rows in file 1 greater of file2, file 1 has 15 rows not present in file2

how can find out these rows?

thank you

the comm command find lines unique either file, or common both.

comm -23 <( sort file1 ) <( sort file2 ) 

will print lines in file1 (lines in file2 , common lines suppressed -2 , -3 options. files must sorted; doesn't matter how sorted, long both sorted on same key , in same way.


Comments