1 .\" $NetBSD: pr.1,v 1.16 2003/10/13 07:41:22 agc Exp $
3 .\" Copyright (c) 1991 Keith Muller.
5 .\" The Regents of the University of California. All rights reserved.
7 .\" This code is derived from software contributed to Berkeley by
8 .\" Keith Muller of the University of California, San Diego.
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in the
17 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. Neither the name of the University nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" from: @(#)pr.1 8.1 (Berkeley) 6/6/93
35 .\" $NetBSD: pr.1,v 1.16 2003/10/13 07:41:22 agc Exp $
99 utility is a printing and pagination filter for text files.
100 When multiple input files are specified, each is read, formatted,
101 and written to standard output.
102 By default, the input is separated into 66-line pages, each with
105 A 5-line header with the page number, date, time, and
106 the pathname of the file.
108 A 5-line trailer consisting of blank lines.
111 If standard output is associated with a terminal,
112 diagnostic messages are suppressed until the
114 utility has completed processing.
116 When multiple column output is specified,
117 text columns are of equal width.
118 By default text columns are separated by at least one
119 .Em \*[Lt]blank\*[Gt] .
120 Input lines that do not fit into a text column are truncated.
121 Lines are not truncated under single column output.
123 In the following option descriptions, column, lines, offset, page, and
124 width are positive decimal integers and gap is a nonnegative decimal integer.
127 Begin output at page number
129 of the formatted input.
131 Produce output that is
133 wide (default is 1) that is written vertically
134 down each column in the order in which the text
135 is received from the input file.
141 This option should not be used with
145 the minimum number of lines is used to display the output.
147 Modify the effect of the
149 option so that the columns are filled across the page in a round-robin order
150 (e.g., when column is 2, the first input line heads column
151 1, the second heads column 2, the third is the second line
153 This option requires the use of the
157 Produce output that is double spaced. An extra
158 .Em \*[Lt]newline\*[Gt]
159 character is output following every \*[Lt]newline\*[Gt] found in the input.
160 .It Fl e Ar \&[char\&]\&[gap\&]
161 Expand each input \*[Lt]tab\*[Gt] to the next greater column
162 position specified by the formula
166 is an integer \*[Gt] 0.
169 is zero or is omitted the default is 8.
172 characters in the input are expanded into the appropriate
174 .Em \*[Lt]space\*[Gt]s .
175 If any nondigit character,
177 is specified, it is used as the input tab character.
180 .Em \*[Lt]form-feed\*[Gt]
181 character for new pages,
182 instead of the default behavior that uses a
184 .Em \*[Lt]newline\*[Gt]
192 .It Fl i Ar \&[char\&]\&[gap\&]
193 In output, replace multiple \*[Lt]space\*[Gt]s with \*[Lt]tab\*[Gt]s whenever two or more
194 adjacent \*[Lt]space\*[Gt]s reach column positions
200 is zero or omitted, default
202 settings at every eighth column position
204 If any nondigit character,
206 is specified, it is used as the output
210 Override the 66 line default and reset the page length to
214 is not greater than the sum of both the header and trailer
215 depths (in lines), the
217 utility suppresses output of both the header and trailer, as if the
219 option were in effect.
221 Merge the contents of multiple files.
222 One line from each file specified by a file operand is
223 written side by side into text columns of equal fixed widths, in
224 terms of the number of column positions.
225 The number of text columns depends on the number of
226 file operands successfully opened.
227 The maximum number of files merged depends on page width and the
228 per process open file limit.
234 .It Fl n Ar \&[char\&]\&[width\&]
237 digit line numbering.
240 if not specified, is 5.
241 The number occupies the first
243 column positions of each text column or each line of
248 (any nondigit character) is given, it is appended to the line number to
249 separate it from whatever follows. The default for
252 .Em \*[Lt]tab\*[Gt] .
253 Line numbers longer than
255 columns are truncated.
257 Each line of output is preceded by
259 .Em \*[Lt]spaces\*[Gt]s .
262 option is not specified, the default is zero.
263 The space taken is in addition to the output line width.
265 Write no diagnostic reports on failure to open a file.
267 Separate text columns by the single character
269 instead of by the appropriate number of
270 .Em \*[Lt]space\*[Gt]s
279 format string to be used to format the date and time information in the page
282 Print neither the five-line identifying
283 header nor the five-line trailer usually supplied for each page.
284 Quit printing after the last line of each file without spacing to the
287 Set the width of the line to
289 column positions for multiple text-column output only.
292 option is not specified and the
294 option is not specified, the default width is 72.
297 option is not specified and the
299 option is specified, the default width is 512.
301 A pathname of a file to be printed.
304 operands are specified, or if a
308 the standard input is used.
309 The standard input is used only if no
311 operands are specified, or if a
319 option does not allow the option letter to be separated from its
320 argument, and the options
325 require that both arguments, if present, not be separated from the option
330 receives an interrupt while printing to a terminal, it
331 flushes all accumulated error messages to the screen before
336 utility exits 0 on success, and 1 if an error occurs.
338 Error messages are written to standard error during the printing
339 process (if output is redirected) or after all successful
340 file printing is complete (when printing to a terminal).