Section: cut and paste

Merge files side by side

bash
bash
paste names.txt emails.txt
Explanation

The nth line of each file is merged into a single output row.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing cut and paste
Paste with a custom delimiter
Combine files using commas or tabs.
OpenIn sheetbashsame section
Extract comma-delimited fields
Print the first and third fields from a CSV-like file.
OpenIn sheetbashsame section
Extract character positions
Print characters 1 through 8 from each line.
OpenIn sheetbashsame section
Exclude selected fields
Print all fields except one.
OpenIn sheetbashsame section
Join two files on a common field
Merge records based on matching first fields.
OpenIn sheetbash1 tag match
Sort lines alphabetically
Default lexicographic sort.