join

Join lines of two sorted files on a field

low risk

interactive breakdown — edit the command and press Explain
$ 
What it does

Relational join of two files on a common field. Inputs must be sorted on the join field.

Common flags
FlagMeaning
-1Join field in file 1
-2Join field in file 2
-tField separator
-aAlso print unpairable lines
Examples
join -t, a.csv b.csvJoin CSV files on the first field · explain & risk-check →
Related
sort paste
Open the full explainer →More in Text Processing

Reference text is hand-written and may be incomplete — check man join for your version. Test destructive commands on a non-production system first.