PR(1) User Commands PR(1)

pr - print files

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

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.
For multi-column output, print the lines of each file columnized in rows across the page.
Double-space the output, i.e print two newline characters at the end of each line.
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.
Print a single formfeed character instead of the five-newline sequence at the footer of each page.
For /usr/5bin/pr and /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/5bin/posix/pr and /usr/5bin/posix2001/pr.
Take the next argument as a page header.
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/5bin/posix/pr and /usr/5bin/posix2001/pr, single space characters preceding a column alignment are not replaced.
Take the length of the page to be n lines instead of the default 66.
Print all files simultaneously, each in one column.
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.
Precede each output line by n space characters. The width set with -w is not affected.
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.
Do not print an error message if a file cannot be opened.
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.
Do not print the 5-line header or the 5-line trailer normally supplied for each page.
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.

See locale(7).
Determines the mapping of bytes to characters and the width of characters.
Affects the format of date strings printed.

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

cat(1), pg(1)

1/24/05 Heirloom Toolchest