Linux and Unix paste command

Quick links

About paste
Syntax
Examples
Related commands
Linux and Unix main page

About paste

The paste command displays the corresponding lines of multiple files side-by-side.

Syntax

paste [OPTION]... [FILE]...

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.

Options

-d, --delimiters=LIST reuse characters from LIST instead of tabs.
-s, --serial paste one file at a time instead of in parallel.
--help Display a help message, and exit.
--version Display version information, and exit.

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
diff
merge
sdiff