LinuxCommandLibrary

pr

Paginate and format text for printing

TLDR

Format file for printing

$ pr [file]
copy
Add page header
$ pr -h "[Header Text]" [file]
copy
Multi-column output
$ pr -[3] [file]
copy
Double space output
$ pr -d [file]
copy
Number lines
$ pr -n [file]
copy

SYNOPSIS

pr [options] [files]

DESCRIPTION

pr formats text files for printing by adding page headers (with filename and date), footers, page breaks, and line numbers. It can arrange text into multiple columns and control page dimensions including length, width, and margins.
This traditional Unix utility is useful for preparing plain text documents for printing or for creating formatted multi-column layouts from single-column input. It reads from files or stdin and writes to stdout.

PARAMETERS

FILES

Input files.
-h HEADER
Page header text.
-NUM
Number of columns.
-d
Double space.
-n
Number lines.
-l LINES
Page length.
-w WIDTH
Page width.

CAVEATS

Standard Unix utility. Part of coreutils.

HISTORY

pr is a traditional Unix text formatting utility.

SEE ALSO

fmt(1), fold(1), column(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community