Join
lastmod 2026-11-10created 2023-12-263 edits
join is a Unix command-line tool that merges two text files on a common field (the first field by default) and prints them joined into a single line, like a join in a relational database. Both inputs must be sorted on the join field beforehand; the -1 and -2 options set the field number for each file, -t sets the delimiter, and -a also prints unpaired lines. It is used together with sort, cut, awk, and others to process tabular data in the shell.