pr(1) CLIX pr(1)
NAME
pr - Displays files
SYNOPSIS
pr [[-column] [-wwidth] [-a]] [-eck] [-ick] [-drtfp] [+page] [-nck] [-
ooffset] [-llength] [-sseparator] [-hheader] [file ... ]
pr [-m] [wwidth]] [-eck] [-ick] [-drtfp] [+page] [-nck] [-ooffset] [-
llength] [-sseparator] [-hheader] file1 file2 ...
FLAGS
+page Begin displaying with page numbered page (default is 1).
-column Display column columns of output (default is 1). Output
appears as if - and -i are turned on for multi-column
output. May not use with -m.
-a Display multi-column output across the page one line per
column. columns must be greater than one. If a line is too
long to fit in a column, it is truncated.
-m Merge and display all files simultaneously, one per column.
The maximum number of files that may be specified is eight.
If a line is too long to fit in a column, it is truncated.
May not use with -column.
-d Double-space the output. Blank lines that result from
double-spacing are dropped when they occur at the top of a
page.
-eck Expand input tabs to character positions k+1, 2*k+1, 3*k+1,
and so on. If k is 0 or is omitted, default tab settings at
every eighth position are assumed. The <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 (the default for c is
the <Tab> character).
-ick In output, replace white space wherever possible by
inserting multiple <Tab> inputs to character positions k+1,
2*k+1, 3*k+1, and so on. 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 (the default for c is the <Tab> character).
-nck Provide k-digit line numbering (the default for k is 5).
The number occupies the first k+1 character positions of
each column of single column output or each line of -m
2/94 - Intergraph Corporation 1
pr(1) CLIX pr(1)
output. If c (any nondigit character) is given, it is
appended to the line number to separate it from whatever
follows (the default for c is a <Tab> character.
-wwidth Set the width of a line to width character positions (the
default is 72). This is effective only for multi-column
output (-column and -m). There is no line limit for single
column output.
-ooffset Offset each line by offset character positions (the default
is 0). The number of character positions per line is the
sum of the width and offset.
-llength Set the length of a page to length lines (the default is
66). Any -l0 is reset to -l66. When the value of length is
10 or less, -t appears to be in effect since headers and
trailers are suppressed. By default, output contains 5
lines of header and 5 lines of trailer leaving 56 lines for
user-supplied text. When -llength is used and length
exceeds 10, then length - 10 lines are left per page for
user supplied text. When length is 10 or less, header and
trailer output is omitted to make room for user supplied
text.
-hheader Use header as the text line of the header to be displayed
instead of the filename. The -h flag is ignored when -t is
specified or -llength is specified and the value of length
is 10 or less. (-h is the only pr flag requiring space
between the flag and argument.)
-p Pause before beginning each page if the output is directed
to a terminal (pr will ring the bell at the terminal and
wait for a carriage return).
-f Use single formfeed character for new pages (the default is
to use a sequence of linefeeds). Pause before beginning the
first page if stdout is associated with a terminal.
-r Display no diagnostic reports on files that will not open.
-t Display neither the five-line identifying header nor the
five-line trailer normally supplied for each page. Quit
displaying after the last line of each file without spacing
to the end of the page. Use of -t overrides the -h flag.
-sseparator Separate columns by the single character separator instead
of by the appropriate number of spaces; <Tab> is the default
separator. This flag prevents truncation of lines on
multicolumn output unless -w is specified.
DESCRIPTION
2 Intergraph Corporation - 2/94
pr(1) CLIX pr(1)
The pr command is used to format and display the contents of a file. If
file is -, or if no files are specified, pr assumes stdin. The pr command
displays the named files on stdout.
By default, the listing is separated into pages, each headed by the page
number, the date and time that the file was last modified, and the name of
the file. Page length is 66 lines which includes 10 lines of header and
trailer output. The header is composed of 2 blank lines, 1 line of text
can be altered with -h), and 2 blank lines; the trailer is 5 blank lines.
For single column output, line width may not be set and is unlimited. For
multicolumn output, line width may be set and the default is 72 columns.
Diagnostic reports (failed options) are reported at the end of stdout
associated with a terminal, rather than interspersed in the output. Pages
are separated by series of linefeeds rather than formfeed characters.
By default, columns are of equal width, separated by at least one space;
lines which do not fit are truncated. If the -s flag is used, lines are
not truncated and columns are separated by the separator character.
Either -column or -m should be used to produce multi-column output. The
-a flag should only be used with -column and not -m.
EXAMPLES
1. Display file1 and file2 as a double-spaced, three-column listing
headed by ``file list'':
pr -3dh "file list" file1 file2
2. Copy file1 to file2, expanding tabs to columns 10, 19, 28, 37, ... :
pr -e9 -t <file1 >file2
3. Display file1 and file2 simultaneously in a two-column listing with no
header or trailer where both columns have line numbers:
pr -t -n file1 | pr -t -m -n file2 -
FILES
/dev/tty* If stdout is directed to one of the special files /dev/tty*,
then other output directed to this terminal is delayed until
stdout is completed. This prevents error messages from being
interspersed throughout the output.
DIAGNOSTICS
pr: only one of either -m or -column allowed.
2/94 - Intergraph Corporation 3
pr(1) CLIX pr(1)
The -m (multicolumn) flag and the -c flag cannot both be used.
EXIT VALUES
The pr command exits with a nonzero value if an error occurs.
RELATED INFORMATION
Commands: cat(1), pg(1)
4 Intergraph Corporation - 2/94