HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)

p
pr(1) pr(1)
NAME
pr - print files
SYNOPSIS
pr [options][files]
DESCRIPTION
The
pr command prints the named files on the standard output. If file is
-, or if no files are specified, the
standard input is assumed. By default, the listing is separated into pages, each headed by the page
number, a date and time, and the name of the file.
By default, columns are of equal width, separated by at least one space; lines that do not fit are truncated.
If the
-s option is used, lines are not truncated and columns are separated by the separation character.
If the standard output is associated with a terminal, error messages are withheld until
pr has completed
printing.
Options
The following options can be used singly or combined in any order:
+k Begin printing with page k (default is 1).
-k Produce k-column output (default is 1). This option should not be used with
-m. The
options
-e and -i are assumed for multi-column output.
-c k Produce k-column output, same as -k.
-a Print multi-column output across the page. This option is appropriate only with the
-k
option.
-m Merge and print all files simultaneously, one per column (overrides the
-k and -a options).
-d Double space the output.
-eck Expand input tabs to character positions k+1, 2×k+1, 3×k+1, etc. If k is 0 or is omitted,
default tab settings at every eighth position are assumed. Tab characters in the input are
expanded into the appropriate number of spaces. If c (any nondigit character) is given, it is
treated as the input tab character (default for c is the tab character).
-ick In output, replace white space wherever possible by inserting tabs to character positions
k+1, 2×k+1, 3×k+1, etc. If k is 0 or is omitted, default tab settings at every eighth position
are assumed. If c (any nondigit character) is given, it is treated as the output tab character
(default for c is the tab character).
If the UNIX95 flag is set, pr replaces multiple space characters with tabs only when two
or more adjacent space characters reach column positions k+1, 2×k+1, 3×k+1, etc.
-nck Provide k-digit line numbering (default for k is 5). The number occupies the first k+1 char-
acter positions of each column of normal output or each line of
-m output. If c (any nondi-
git character) is given, it is appended to the line number to separate it from whatever fol-
lows (default for c is a tab).
-wk Set the width of a line to k character positions (default is 72 for equal-width, multi-column
output; no limit otherwise). Width specifications are only effective for multi-columnar out-
put.
-ok Offset each line by k character positions (default is 0). The number of character positions
per line is the sum of the width and offset.
-lk Set the length of a page to k lines (default is 66). If k is less than what is needed for the
page header and trailer, the -t option is in effect; that is, header and trailer lines are
suppressed in order to make room for text.
-h Use the next argument as the header to be printed instead of the file name.
-p Pause before beginning each page if the output is directed to a terminal (pr rings the bell
at the terminal and waits for a Return).
-F Use form-feed character for new pages (default is to use a sequence of line-feeds). Pause
before beginning the first page if the standard output is associated with a terminal.
HP-UX 11i Version 1: September 2005 1 Hewlett-Packard Company Section 1777