xref: /csrg-svn/old/pr/pr.1 (revision 50663)
143083Scael.\" Copyright (c) 1990 The Regents of the University of California.
243083Scael.\" All rights reserved.
319255Smckusick.\"
4*50663Scael.\" %sccs.include.redist.roff%
519255Smckusick.\"
6*50663Scael.\"	@(#)pr.1	6.5 (Berkeley) 07/29/91
743083Scael.\"
843083Scael.Dd
943083Scael.Dt PR 1
10*50663Scael.Os BSD 4.3r
1143083Scael.Sh NAME
1243083Scael.Nm pr
1343083Scael.Nd Print files.
1443083Scael.Sh SYNOPSIS
1544957Scael.Nm pr
16*50663Scael.Op Cm \&+ Ns Ar page
17*50663Scael.Op Fl Ns Ar column
1843083Scael.Op Fl f
19*50663Scael.Op Fl h Ns Ar header
20*50663Scael.Op Fl l Ns Ar lines
2143083Scael.Op Fl m
22*50663Scael.Op Fl s Ns Ar char
2343083Scael.Op Fl t
24*50663Scael.Op Fl w Ns Ar width
25*50663Scael.Op Ar
2643083Scael.Sh DESCRIPTION
2743083ScaelThe
2843083Scael.Nm pr
2943083Scaelutility is a printing and pagination filter.
3043083ScaelIf multiple
3143083Scaelinput files are specified, each is read, formatted,
3243083Scaeland written to standard output.
3343083ScaelBy default, the input is
3443083Scaelseparated into pages, each with a header that includes the
3543083Scaelpage number, date, time, and the file's pathname.
3643083ScaelText
3743083Scaelcolumns are of equal width, with at least one <blank>
3843083Scaelseparation between text columns.
3943083ScaelLines that do not fit into
4043083Scaela text column are truncated.
4143083ScaelIf standard output is associated
4243083Scaelwith a terminal, diagnostic messages are suppressed
4344957Scaeluntil the
4444957Scael.Nm
4544957Scaelutility has completed processing.
4643083Scael.Pp
4743083ScaelThe following options are available:
48*50663Scael.Bl -tag -width Fl
49*50663Scael.It Cm \&+ Ns Ar page
5043083ScaelBegin output at page number page of the
5143083Scaelformatted input.
52*50663Scael.It Fl Ns Ar column
5343083ScaelProduce output that is columns wide (default
5443083Scaelis 1) and is in text column rank order.
5543083ScaelThis
5644957Scaeloption should not be used with
5744957Scael.Fl m .
5843083ScaelWhen
5944957Scaelused with
6044957Scael.Fl t ,
6144957Scaeluse the minimum number of lines
6243083Scaelto display the output.
63*50663Scael.It Fl f
6443083ScaelUse <form-feed> character for new pages,
6543083Scaelinstead of the default behavior that uses a
6643083Scaelsequence of <newline> characters.
6743083ScaelPrior to
6843083Scaeldisplaying the first page of output an
6943083Scael<alert> character is written to standard output.
70*50663Scael.It  Fl h Ns Ar header
7143083ScaelUse the string header as the header to be
7243083Scaelprinted instead of file.
73*50663Scael.It Fl l Ns Ar lines
7443083ScaelOverride the 66 line default and reset the
7543083Scaelpage length to lines.
7643083ScaelIf lines is smaller
7743083Scaelthan the sum of both the header and trailer
78*50663Scaeldepths (in lines), the
79*50663Scael.Nm pr
80*50663Scaelutility suppresses
8144957Scaelboth the header and trailer, as if the
8244957Scael.Fl t
8343083Scaeloption were in effect.
84*50663Scael.It Fl m
8543083ScaelMerge files.
8643083ScaelStandard output is formatted so
8743083Scaelthe
8843083Scael.Nm pr
8943083Scaelutility writes one line from each file
9043083Scaelspecified by a file operand, side by side
9143083Scaelinto text columns of equal fixed widths, in
9243083Scaelterms of the number of column positions.
93*50663Scael.It Fl s Ns Ar char
9443083ScaelSeparate text columns by the single character
9543083Scaelchar instead of by the appropriate number of
9643083Scael<space>s (default for char is the <tab> character).
97*50663Scael.It Fl t
9843083ScaelPrint neither the five-line identifying
9943083Scaelheader nor the five-line trailer usually
10043083Scaelsupplied for each page.
10143083ScaelQuit printing after the
10243083Scaellast line of each file without spacing to the
10343083Scaelend of the page.
104*50663Scael.It Fl w Ns Ar width
10543083ScaelSet the width of the line to width column
10643083Scaelpositions for multiple text-column output
10743083Scaelonly (default is 72).
108*50663Scael.El
10943083Scael.Pp
11043083ScaelThe following operands are available:
111*50663Scael.Bl -tag -width Fl
112*50663Scael.It Ar file
11343083ScaelA pathname of a file to be printed.
114*50663Scael.El
11543083Scael.Pp
11643083ScaelIf no file
11744957Scaeloperands are specified, or if a file operand is
11844957Scael.Sq Fl ,
11943083Scaelthe standard input is used.
12043083Scael.Pp
12143083ScaelThe standard input is used only if no file operands are
12244957Scaelspecified, or if a file operand is
12344957Scael.Sq Fl .
12443083Scael.Pp
125*50663ScaelIf
126*50663Scael.Nm pr
127*50663Scaelreceives an interrupt while printing to a terminal, it
12843083Scaelflushes all accumulated error messages to the screen before
12943083Scaelterminating.
13043083Scael.Pp
131*50663ScaelThe
132*50663Scael.Nm pr
133*50663Scaelutility output is a paginated version of the original
13443083Scaelfile (or files).
13543083ScaelThis pagination is optionally done using
13643083Scael<form-feed>s or a sequence of <newline>s.
13743083ScaelPage headers are
13844957Scaelgenerated unless the
13944957Scael.Fl t
14044957Scaeloption is specified.
14143083Scael.Pp
14243083ScaelThe
14343083Scael.Nm pr
14443083Scaelutility exits 0 on success, and >0 if an error occurs.
14543083Scael.Pp
14643083ScaelError
14743083Scaelmessages are written to standard error during the printing
14843083Scaelprocess (if output is redirected) or after all successful
14943083Scaelfile printing is complete (when printing to a terminal).
15044957Scael.Sh SEE ALSO
15144957Scael.Xr more 1
15243083Scael.Sh STANDARDS
15343083ScaelThe
15443083Scael.Nm pr
155*50663Scaelfunction is expected to be
156*50663Scael.St -p1003.2
157*50663Scaelcompatible.
158