|
|
1.1 root 1: .\" Copyright (c) 1990 The Regents of the University of California.
2: .\" All rights reserved.
3: .\"
4: .\" Redistribution and use in source and binary forms are permitted provided
5: .\" that: (1) source distributions retain this entire copyright notice and
6: .\" comment, and (2) distributions including binaries display the following
7: .\" acknowledgement: ``This product includes software developed by the
8: .\" University of California, Berkeley and its contributors'' in the
9: .\" documentation or other materials provided with the distribution and in
10: .\" all advertising materials mentioning features or use of this software.
11: .\" Neither the name of the University nor the names of its contributors may
12: .\" be used to endorse or promote products derived from this software without
13: .\" specific prior written permission.
14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17: .\"
18: .\" @(#)pr.1 6.3 (Berkeley) 7/24/90
19: .\"
20: .Dd July 24, 1990
21: .Dt PR 1
22: .Os BSD 4.3+Reno
23: .Sh NAME
24: .Nm pr
25: .Nd Print files.
26: .Sh SYNOPSIS
27: .Nm pr
28: .Oo
29: .Op Cm \&+ Ar page
30: .Op Fl Ar column
31: .Oo
32: .Op Fl f
33: .Op Fl hheader
34: .Op Fl llines
35: .Op Fl m
36: .Oo
37: .Op Fl s Ar char
38: .Oo
39: .Op Fl t
40: .Oo
41: .Op Fl w Ar width
42: .Oo
43: .Ar
44: .Sh DESCRIPTION
45: The
46: .Nm pr
47: utility is a printing and pagination filter.
48: If multiple
49: input files are specified, each is read, formatted,
50: and written to standard output.
51: By default, the input is
52: separated into pages, each with a header that includes the
53: page number, date, time, and the file's pathname.
54: Text
55: columns are of equal width, with at least one <blank>
56: separation between text columns.
57: Lines that do not fit into
58: a text column are truncated.
59: If standard output is associated
60: with a terminal, diagnostic messages are suppressed
61: until the
62: .Nm
63: utility has completed processing.
64: .Pp
65: The following options are available:
66: .Tw Fl
67: .Tc Cm \&+
68: .Ar page
69: .Cx
70: Begin output at page number page of the
71: formatted input.
72: .Tc Fl
73: .Ar column
74: .Cx
75: Produce output that is columns wide (default
76: is 1) and is in text column rank order.
77: This
78: option should not be used with
79: .Fl m .
80: When
81: used with
82: .Fl t ,
83: use the minimum number of lines
84: to display the output.
85: .Tp Fl f
86: Use <form-feed> character for new pages,
87: instead of the default behavior that uses a
88: sequence of <newline> characters.
89: Prior to
90: displaying the first page of output an
91: <alert> character is written to standard output.
92: .Tp Cx Fl h
93: .Ar header
94: .Cx
95: Use the string header as the header to be
96: printed instead of file.
97: .Tp Cx Fl l
98: .Ar lines
99: .Cx
100: Override the 66 line default and reset the
101: page length to lines.
102: If lines is smaller
103: than the sum of both the header and trailer
104: depths (in lines), the pr utility suppresses
105: both the header and trailer, as if the
106: .Fl t
107: option were in effect.
108: .Tp Fl m
109: Merge files.
110: Standard output is formatted so
111: the
112: .Nm pr
113: utility writes one line from each file
114: specified by a file operand, side by side
115: into text columns of equal fixed widths, in
116: terms of the number of column positions.
117: .Tp Cx Fl s
118: .Ar char
119: .Cx
120: Separate text columns by the single character
121: char instead of by the appropriate number of
122: <space>s (default for char is the <tab> character).
123: .Tp Fl t
124: Print neither the five-line identifying
125: header nor the five-line trailer usually
126: supplied for each page.
127: Quit printing after the
128: last line of each file without spacing to the
129: end of the page.
130: .Tp Cx Fl w
131: .Ar width
132: .Cx
133: Set the width of the line to width column
134: positions for multiple text-column output
135: only (default is 72).
136: .Tp
137: .Pp
138: The following operands are available:
139: .Tw Fl
140: .Tp Ar file
141: A pathname of a file to be printed.
142: .Tp
143: .Pp
144: If no file
145: operands are specified, or if a file operand is
146: .Sq Fl ,
147: the standard input is used.
148: .Pp
149: The standard input is used only if no file operands are
150: specified, or if a file operand is
151: .Sq Fl .
152: .Pp
153: If pr receives an interrupt while printing to a terminal, it
154: flushes all accumulated error messages to the screen before
155: terminating.
156: .Pp
157: The pr utility output is a paginated version of the original
158: file (or files).
159: This pagination is optionally done using
160: <form-feed>s or a sequence of <newline>s.
161: Page headers are
162: generated unless the
163: .Fl t
164: option is specified.
165: .Pp
166: The
167: .Nm pr
168: utility exits 0 on success, and >0 if an error occurs.
169: .Pp
170: Error
171: messages are written to standard error during the printing
172: process (if output is redirected) or after all successful
173: file printing is complete (when printing to a terminal).
174: .Sh SEE ALSO
175: .Xr more 1
176: .Sh STANDARDS
177: The
178: .Nm pr
179: function is expected to be POSIX 1003.2 compatible.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.