Lucas Melin

Performing JOINs on text files

Posted on February 20, 2018  •  1 minutes  • 152 words

Linux comes equipped with a handy utility aptly called JOIN which performs join operations on text files.

Performing an inner join is as simple as running join file1.txt file2.txt

Producing an outer join can be a bit more verbose. The following command is an example of an outer join.

join -t $’\t’ -o 0,1.2,2.2 -a 1 -a 2 file1.txt file2.txt

Let’s break that down a bit.

Elsewhere on the internet

Other places you can find me online