Back to the learning path

join

join: like a database JOIN Command details
Step 1/1: Join on a common field

join works like a database join: it merges lines whose first field (or the fields chosen with -1/-2) match. Both files must be sorted on that field. -t, splits on commas.

$ join -t, users.csv orders.csv
Advancedjoin
Join two tables on an id
users.csv is "id,name" and orders.csv is "id,item", both sorted by id. Use join to combine them on the id (comma-separated).
pasteNext lesson:comm