Merge Files into Columns with paste

Join corresponding lines of two or more files side by side — the low-effort alternative to awk for quick column pairing.

LinuxpastetextcliLow risk
Run paste -d, names.txt emails.txt to print line 1 of each file joined with a comma, then line 2, and so on.

01Command

Command
$ paste -d, names.txt emails.txt

02What it does

paste reads all inputs in parallel and joins their lines with a delimiter: default TAB, or anything you pass to -d (a comma makes instant CSV). It is simpler than awk join logic for the common case of two equal-length lists, and with a single file plus -s it concatenates lines serially, which is handy for flattening a list onto one line. Shorter files are padded with empty fields rather than aborting.

03Risk

RiskLow risk
Requirementscoreutils (preinstalled)
!Warning: paste does not sort or match rows — the join is purely positional, so both files must already be in the same order.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • paste(1) — merge lines of files
    man7.org · community · 2026-09-17
    Evidence: Documents paste as merging lines of files and the -d/--delimiters option; confirmed -d and merge in the man page text.
  • paste(1) — Debian man page (coreutils)
    Debian manpages · community · 2026-09-17
    Evidence: Man page documents -d delimiters and -s serial mode (paste one file at a time instead of in parallel); confirmed in page text.

Last verified: 2026-09-19 · Category: Files & Folders

06Related solutions