Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
User Commands (p - r) pr(1)
NAME
pr - Writes a file to standard output
SYNOPSIS
pr [-adfFmprt][-e][character][number][-h header] [-i][character][gap][-l lines]
[-n][character][width]|[-x][character][number][-o offset][-s][character][-w width]
[-column][+page][file ...]
The pr command writes file to standard output. If you do not specify file or if file is -, pr
reads standard input.
FLAGS
-a Displays multicolumn output across the page. (This flag is useful only in combination
with the -column flag. It modifies -column so that columns are filled across the page in
a round robin order.)
-d Doublespaces the output.
-e[character][number]
Expands tabs to byte positions number+1, 2*number+1, 3*number+1, and so on. The
default value of number is 8. Tab characters in the input expand to the appropriate
number of spaces to line up with the next tab setting. If you specify character (any
character other than a digit) that character becomes the input tab character. The
default value of character is the ASCII tab character.
-f Uses a formfeed character to advance to a new page. (Otherwise, pr issues a sequence
of newline characters.) Pauses before beginning the first page if the standard output is
a tty.
-F Uses a formfeed character to advance to a new page. (Otherwise, pr issues a sequence
of newline characters.) Does not pause before beginning the first page if the standard
output if a tty.
-h header
Displays header instead of the filename in the page header.
-i[character][gap]
Replaces white space wherever possible by inserting tabs to positions gap+1, 2*gap+1,
3*gap+1, and so on. The default value of gap is 8. If you specify character (any char-
acter other than a digit), that character becomes the output tab character. (The default
value of character is the ASCII tab character.)
-l lines Sets the length of a page to lines lines (the default is 66). If lines is less than the sum of
the header and trailer, pr suppresses both header and trailer, as if -t were in effect.
-m Combines and writes all files at the same time, with each file in a separate column.
(This overrides the -column and -a flags.)
-n[character][width]
Provides width-digit line numbering (the default value of width is 5). The number
occupies the first width positions of each column of normal output (or each line of -m
output). If you specify character (any character, other than a digit), that character is
added to the line number to separate it from whatever follows. (The default value of
character is an ASCII tab character.)
-o offset Indents each line of output by offset byte positions (the default is 0). This is in addition
to output width (see -w).
527188-004 Hewlett-Packard Company 7−29