paste on Linux merges corresponding lines from files — perfect when one file has IDs and another has labels, or when you need a quick two-column view without a spreadsheet.
Side by side
Default delimiter is TAB between merged columns.
bashtwo files
paste ids.txt names.txt

Custom delimiter
-d sets the column separator — comma for pseudo-CSV.
bashcsv-ish
paste -d, names.txt scores.txt

Serial mode
-s joins all lines from one file into one row (then repeats per file).
bashserial
paste -s -d, row.txt

With cut in pipelines
paste output often feeds cut or sort — keep field counts consistent.
TipIf files have different line counts, paste pads with empty fields — always sanity-check line counts with
wc -l.
Quick Reference
- Merge:
paste a.txt b.txt - Delimiter:
paste -d, a b - Rows:
paste -s file
Related tutorials
Diagrams are original illustrations by Gnome IT Solutions. Tutorial text © Gnome IT Solutions.