LinuxCommandLibrary

pr

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 for printing. Paginates and columnates.
The tool adds headers and footers. Prepares files for output.
pr formats for printing.

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)

Copied to clipboard