nievergeltlab
6/23/2017 - 9:08 PM

Join two files using the join command. Adjust for localization issues that cause improper sorting.

Join two files using the join command. Adjust for localization issues that cause improper sorting.

LC_ALL=C sort -k1b,1 file1.txt > file1.txt.sorted
LC_ALL=C sort -k1b,1 file2.txt > file2.txt.sorted
LC_ALL=C join file1.txt.sorted file2.txt.sorted > joined.txt