join -t, -1 1 -2 1 ids.s.csv scores.s.csv

Category: Data Science & Analysis

join -t, -1 1 -2 1 ids.s.csv scores.s.csv

Join two sorted CSVs on their first column

join merges two sorted files on a common key column: -1 1 and -2 1 name the key as column 1 of each file, and -t, declares the comma delimiter. Both inputs must be pre-sorted on the key or the join silently misses matches. This is the classic text-tools join, distinct from CSV-aware tools like xsv join. The output combines matching rows into one line.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.