PR(1)

NAME
pr - print files

SYNOPSIS
pr [ option ] ... [ file ] ...

DESCRIPTION
Pr produces a printed listing of one or more files. The output is separated into pages headed by a date, the name of the file or a specified header, and the page number. If there are no file arguments, pr prints its standard input.

Options apply to all files:

-n  Produce n-column output, with the lines of each file aligned in columns for each output page.

+n  Begin printing with page n.

-a  For multi-column output, print the lines of each file columnized in rows across the page.

-d  Double-space the output, i.e print two newline characters at the end of each line.

-e[c][n]
    Replace occurrences of tab characters in input with n spaces, or with 8 spaces if n is omitted. If the non-numeric character c is present, it is taken as tab character on input.

-f  Print a single formfeed character instead of the five-newline sequence at the footer of each page.

-F  For /usr/local/heirloom/usr/5bin/pr and /usr/local/heirloom/usr/5bin/s42/pr, fold the lines of input files for single-column output, or stretch excess data across multiple cells of multi-column output. This option is the same as -f with /usr/local/heirloom/usr/5bin/posix/pr and /usr/local/heirloom/usr/5bin/posix2001/pr.

-h header
    Take the next argument as a page header.

-i[c][n]
    Replace spaces with tab characters in output if they align to the n-th column or a multiple of it. If the non-numeric character c is present, it is taken instead as tab character on output. For /usr/local/heirloom/usr/5bin/posix/pr and /usr/local/heirloom/usr/5bin/posix2001/pr, single space characters preceding a column alignment are not replaced.

-ln Take the length of the page to be n lines instead of the default 66.

-m  Print all files simultaneously, each in one column.

-n[c][n]
    Number the output lines, or if multi-column output is produced, the output cells. The width of numbers is set to n (default 5). Numbers are separated from file data by the character c; it defaults to a tab character if this part of the argument is missing.

-on Precede each output line by n space characters. The width set with -w is not affected.

-p  Ring the terminal bell before producing output for each page and wait for the user to type a newline character. This option has no effect if output is not sent to a terminal.

-r  Do not print an error message if a file cannot be opened.

-sc Separate columns by the single character c instead of by the appropriate amount of white space. A missing c is taken to be a tab.

-t  Do not print the 5-line header or the 5-line trailer normally supplied for each page.

-wn For purposes of multi-column and folded output, take the width of the page to be n characters instead of the default 72.

Inter-terminal messages via write(1) are forbidden during a pr.

ENVIRONMENT VARIABLES

LANG, LC_ALL
    See locale(7).

LC_CTYPE
    Determines the mapping of bytes to characters and the width of characters.

LC_TIME
    Affects the format of date strings printed.

FILES

/dev/tty?
    to suspend messages and to read user input with the -p option.

SEE ALSO
cat(1), pg(1)