On Unix-like operating systems, the paste command displays corresponding lines of multiple files side-by-side.
This page covers the GNU/Linux version of paste.
Description
paste writes lines consisting of the sequentially corresponding lines from each FILE, separated by tabs, to the standard output. With no FILE, or when FILE is a dash ("-"), paste reads from standard input.
- Description
- Syntax
- Examples
- Related commands
- Linux commands help
Syntax
paste [OPTION]… [FILE]…
Options
Examples
paste file1.txt file2.txt
This command would display the contents of file1.txt and file2.txt, side-by-side, with the corresponding lines of each file separated by a tab.
Related commands
cat — Output the contents of a file.diff — Identify the differences between two files.merge — Performs a merge of the contents of three files.sdiff — Compare two files, side-by-side.