version 1.2, 1996/06/26 05:37:53 |
version 1.3, 1997/04/23 08:08:31 |
|
|
.Bk -words |
.Bk -words |
.Op Fl Ar column |
.Op Fl Ar column |
.Ek |
.Ek |
.Op Fl adFmrt |
.Op Fl adfFmrt |
.Bk -words |
.Bk -words |
.Oo |
.Oo |
.Op Fl e |
.Op Fl e |
|
|
\(bu A 5-line trailer consisting of blank lines. |
\(bu A 5-line trailer consisting of blank lines. |
.in -2 |
.in -2 |
.Pp |
.Pp |
If standard output is associated with a terminal, |
Optionally, the trailer can be replaced by a |
diagnostic messages are suppressed until the |
.Em <form-feed> |
|
where this is more appropriate for the output device being used and |
|
.Em <tab>s |
|
can be expanded to input relative |
|
.Em <spaces>s |
|
or |
|
.Em <space>s |
|
can contracted to output relative |
|
.Em <tab>s. |
|
The |
.Nm pr |
.Nm pr |
utility has completed processing. |
utility also interprets |
|
.Em <form-feed>s |
|
in the input as logical end of pages. |
.Pp |
.Pp |
When multiple column output is specified, |
When multiple column output is specified, |
text columns are of equal width. |
text columns are of equal width. |
By default text columns are separated by at least one |
By default text columns are separated by at least one |
.Em <blank>. |
.Em <blank> . |
Input lines that do not fit into a text column are truncated. |
Input lines that do not fit into a text column are truncated, except |
Lines are not truncated under single column output. |
in the default single columns output mode. |
|
.Pp |
|
If standard output is associated with a terminal, |
|
diagnostic messages are suppressed until the |
|
.Nm pr |
|
utility has completed processing. |
.Sh OPTIONS |
.Sh OPTIONS |
.Pp |
.Pp |
In the following option descriptions, column, lines, offset, page, and |
In the following option descriptions, |
width are positive decimal integers and gap is a nonnegative decimal integer. |
.Em column , |
|
.Em lines , |
|
.Em offset , |
|
.Em page , |
|
and |
|
.Em width |
|
are positive decimal integers and |
|
.Em gap |
|
is a non-negative decimal integer. |
.Bl -tag -width 4n |
.Bl -tag -width 4n |
.It Ar \&+page |
.It Ar \&+page |
Begin output at page number |
Begin output at page number |
|
|
.It Fl d |
.It Fl d |
Produce output that is double spaced. An extra |
Produce output that is double spaced. An extra |
.Em <newline> |
.Em <newline> |
character is output following every <newline> found in the input. |
character is output following every |
|
.Em <newline> |
|
found in the input. |
.It Fl e Ar \&[char\&]\&[gap\&] |
.It Fl e Ar \&[char\&]\&[gap\&] |
Expand each input <tab> to the next greater column |
Expand each input |
|
.Em <tab> |
|
to the next greater column |
position specified by the formula |
position specified by the formula |
.Ar n*gap+1 , |
.Ar n*gap+1 , |
where |
where |
|
|
sequence of |
sequence of |
.Em <newline> |
.Em <newline> |
characters. |
characters. |
|
.It Fl f |
|
Same as the |
|
.Fl F |
|
option. |
.It Fl h Ar header |
.It Fl h Ar header |
Use the string |
Use the string |
.Ar header |
.Ar header |
|
|
.Ar file name |
.Ar file name |
in the header line. |
in the header line. |
.It Fl i Ar \&[char\&]\&[gap\&] |
.It Fl i Ar \&[char\&]\&[gap\&] |
In output, replace multiple <space>s with <tab>s whenever two or more |
In output, replace multiple |
adjacent <space>s reach column positions |
.Em <space>s |
|
with |
|
.Em <tab>s |
|
whenever two or more |
|
adjacent |
|
.Em <space>s |
|
reach column positions |
.Ar gap+1 , |
.Ar gap+1 , |
.Ar 2*gap+1 , |
.Ar 2*gap+1 , |
etc. |
etc. |
|
|
character. |
character. |
.It Fl l Ar lines |
.It Fl l Ar lines |
Override the 66 line default and reset the page length to |
Override the 66 line default and reset the page length to |
.Ar lines. |
.Ar lines . |
If |
If |
.Ar lines |
.Ar lines |
is not greater than the sum of both the header and trailer |
is not greater than the sum of both the header and trailer |
|
|
Error messages are written to standard error during the printing |
Error messages are written to standard error during the printing |
process (if output is redirected) or after all successful |
process (if output is redirected) or after all successful |
file printing is complete (when printing to a terminal). |
file printing is complete (when printing to a terminal). |
|
.Sh NOTES |
|
.Pp |
|
The interpretation of |
|
.Em <form-feed>s |
|
in the input stream is that they are special |
|
.Em <newline>s |
|
which have the side effect of causing a page break. While this works |
|
correctly for all cases, strict interpretataion also implies that the |
|
common convention of placing a |
|
.Em <form-feed> |
|
on a line by itself is actually interpreted as a blank line, page break, |
|
blank line. |
|
.Sh RESTRICTIONS |
|
.Pp |
|
The |
|
.Nm pr |
|
utility is intended to paginate input containing basic |
|
.Xr ascii 7 |
|
text formatting and input streams containing non-printing |
|
.Em <control-characters> , |
|
.Em <escape-sequences> |
|
or long lines may result in formatting errors. |
|
.Pp |
|
The |
|
.Nm pr |
|
utility does not currently understand over-printing using |
|
.Em <back-space> |
|
or |
|
.Em <return> |
|
characters, and except in the case of unmodified single-column output, |
|
use of these characters will cause formatting errors. |
|
.Sh BUGS |
|
The lack of a line wrapping option, and the specification that truncation |
|
does not apply to single-column output frequently results in formatting |
|
errors when input lines are longer than actual line width of the output device. |
|
.Pp |
|
The default width of 72 is archaic and non-obvious since it is normally |
|
ignored in the default single column mode. Using the |
|
.Fl m |
|
option with one column provides a way to truncate single column output but |
|
there's no way to wrap long times to a fixed line width. |
|
.Pp |
|
The default of |
|
.Em <tab> |
|
for the separator for the |
|
.Fl n |
|
and |
|
.Fl s |
|
options often results in lines apparently wider than expected. |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr cat 1 , |
.Xr cat 1 , |
.Xr more 1 |
.Xr more 1 , |
|
.Xr ascii 7 |
.Sh STANDARDS |
.Sh STANDARDS |
The |
The |
.Nm pr |
.Nm pr |
utility is |
utility is |
.St -p1003.2 |
.St -p1003.2 |
compatible. |
compatible, however that standard is is relatively silent concerning the |
|
handling of input characters beyond the behavior dictated by the |
|
.Nm pr |
|
required command |
|
options. |