Name

pr

Synopsis

                  pr [options] [files]

Convert a text file or files to a paginated, columned version, with headers. If - is provided as the filename, read from standard input.

Options

+ beg_pag[:end-pag], --pages=[beg_pag[:end-pag]

Begin printing on page beg_pag and end on end-pag if specified.

- num_cols, --columns= num_cols

Print in num_cols number of columns, balancing the number of lines in the columns on each page.

-a, --across

Print columns horizontally, not vertically.

-c, --show-control-chars

Convert control characters to hat notation (such as ^C), and other unprintable characters to octal backslash format.

-d, --double-space

Double space.

-D format, --date-format=format

Format the header date using format. See the date command for the possible formats.

-e[tab-char[width]], --expand-tabs=[tab-char[width]]

Convert tabs (or tab-chars) to spaces. If width is specified, convert tabs to width characters (default is 8).

-f, -F, --form-feed

Separate pages with form feeds, not newlines.

-h header, --header= header

Use header for the header instead of the filename.

-i[out-tab-char[out-tab-width]], --output-tabs[=out-tab-char[out-tab-width]]

Replace spaces with tabs on output. Can specify alternative tab character (default is tab) and width (default is 8).

-J, --join-lines

Merge full lines; ignore -W if set.

-l lines, --length= lines

Set page length to lines (default is 66). If lines is less than 10, omit headers and footers.

-m, --merge

Print all files, one per column.

-n[delimiter[digits ...

Get Linux in a Nutshell, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.