# info > paste

---
type: CommandReference
command: paste
mode: info
section: 8.2
source: info
---

## Quick Reference

- `paste file1 file2` — merge corresponding lines, separated by TAB
- `paste - file3 - < file1` — intermix lines from stdin
- `seq 4 | paste -d ' ' - -` — join consecutive lines with a space
- `paste -s file1 file2` — paste lines of each file serially
- `paste -d '%_' file1 file2 file1` — use custom delimiters cyclically
- `paste -z` — treat input/output as NUL-terminated items

## Name

`paste` — Merge lines of files

## Synopsis

paste [OPTION]... [FILE]...
## Options

- `-s, --serial` — Paste the lines of one file at a time rather than one line from each file.
- `-d, --delimiters=DELIM-LIST` — Use characters from DELIM-LIST consecutively instead of TAB; when exhausted, restart at beginning.
- `-z, --zero-terminated` — Delimit items with a zero byte (NUL) instead of newline. Useful with `perl -0`, `find -print0`, `xargs -0`.

## Examples

shell
# Basic merge of two files
$ cat num2
1
2
$ cat let3
a
b
c
$ paste num2 let3
1       a
2       b
        c
shell
# Duplicate lines from a file
$ paste num2 let3 num2
1       a      1
2       b      2
        c
shell
# Intermix lines from stdin
$ paste - let3 - < num2
1       a      2
        b
        c
shell
# Join consecutive lines with a space
$ seq 4 | paste -d ' ' - -
1 2
3 4
shell
# Serial mode: paste lines of each file sequentially
$ paste -s num2 let3
1       2
a       b       c
shell
# Custom delimiters used cyclically
$ paste -d '%_' num2 let3 num2
1%a_1
2%b_2
%c_
## Exit Codes

An exit status of zero indicates success, and a nonzero value indicates failure.