1 .\" $NetBSD: pr.1,v 1.22 2012/08/01 02:36:17 ginsbach Exp $
3 .\" Copyright (c) 1991 Keith Muller.
5 .\" The Regents of the University of California. All rights reserved.
6 .\" Copyright (c) 1994-1995, 1997, 1999-2003, 2009, 2012
7 .\" The NetBSD Foundation, Inc.
9 .\" This code is derived from software contributed to Berkeley by
10 .\" Keith Muller of the University of California, San Diego.
12 .\" Redistribution and use in source and binary forms, with or without
13 .\" modification, are permitted provided that the following conditions
15 .\" 1. Redistributions of source code must retain the above copyright
16 .\" notice, this list of conditions and the following disclaimer.
17 .\" 2. Redistributions in binary form must reproduce the above copyright
18 .\" notice, this list of conditions and the following disclaimer in the
19 .\" documentation and/or other materials provided with the distribution.
20 .\" 3. Neither the name of the University nor the names of its contributors
21 .\" may be used to endorse or promote products derived from this software
22 .\" without specific prior written permission.
24 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 .\" from: @(#)pr.1 8.1 (Berkeley) 6/6/93
50 .Fl e Ns Oo Ar char Oc Ns Op Ar gap
54 .Fl i Ns Oo Ar char Oc Ns Op Ar gap
58 .Fl n Ns Oo Ar char Oc Ns Op Ar width
71 utility is a printing and pagination filter for text files.
72 When multiple input files are specified, each is read, formatted,
73 and written to standard output.
74 By default, the input is separated into 66-line pages, each with
77 A 5-line header with the page number, date, time, and
78 the pathname of the file.
80 A 5-line trailer consisting of blank lines.
83 If standard output is associated with a terminal,
84 diagnostic messages are suppressed until the
86 utility has completed processing.
88 When multiple column output is specified,
89 text columns are of equal width.
90 By default text columns are separated by at least one
92 Input lines that do not fit into a text column are truncated.
93 Lines are not truncated under single column output.
95 In the following option descriptions, column, lines, offset, page, and
96 width are positive decimal integers and gap is a nonnegative decimal integer.
99 Begin output at page number
101 of the formatted input.
103 Produce output that is
105 wide (default is 1) that is written vertically
106 down each column in the order in which the text
107 is received from the input file.
113 This option should not be used with
117 the minimum number of lines is used to display the output.
119 Modify the effect of the
121 option so that the columns are filled across the page in a round-robin order
122 (e.g., when column is 2, the first input line heads column
123 1, the second heads column 2, the third is the second line
125 This option requires the use of the
129 Produce output that is double spaced.
132 character is output following every
135 .It Fl e Ns Oo Ar char Oc Ns Op Ar gap
138 to the next greater column
139 position specified by the formula
143 is an integer \*[Gt] 0.
146 is zero or is omitted the default is 8.
149 characters in the input are expanded into the appropriate
151 .Ao Em space Ac Ns s .
152 If any nondigit character,
154 is specified, it is used as the input tab character.
155 If the first character of
164 character for new pages,
165 instead of the default behavior that uses a
172 Additionally pause before beginning the first page
173 if the standard output is associated with a terminal.
180 .It Fl i Ns Oo Ar char Oc Ns Op Ar gap
181 In output, replace multiple
188 reach column positions
194 is zero or omitted, default
196 settings at every eighth column position
198 If any nondigit character,
200 is specified, it is used as the output
203 If the first character of
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 Ns Oo Ar char Oc Ns Op Ar 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.
254 Line numbers longer than
256 columns are truncated.
258 Each line of output is preceded by
260 .Ao Em space Ac Ns s .
263 option is not specified, the default is zero.
264 The space taken is in addition to the output line width.
266 Pause before beginning each page if the
267 standard output is associated with a terminal.
271 to standard error and wait for a
272 .Aq Em carriage-return
276 Write no diagnostic reports on failure to open a file.
277 .It Fl s Ns Op Ar char
278 Separate text columns by the single character
280 instead of by the appropriate number of
290 format string to be used to format the date and time information in the page
293 Print neither the five-line identifying
294 header nor the five-line trailer usually supplied for each page.
295 Quit printing after the last line of each file without spacing to the
298 Set the width of the line to
300 column positions for multiple text-column output only.
303 option is not specified and the
305 option is not specified, the default width is 72.
308 option is not specified and the
310 option is specified, the default width is 512.
312 A pathname of a file to be printed.
315 operands are specified, or if a
319 the standard input is used.
320 The standard input is used only if no
322 operands are specified, or if a
330 option does not allow the option letter to be separated from its
331 argument, and the options
336 require that both arguments, if present, not be separated from the option
341 receives an interrupt while printing to a terminal, it
342 flushes all accumulated error messages to the screen before
347 utility exits 0 on success, and 1 if an error occurs.
349 Error messages are written to standard error during the printing
350 process (if output is redirected) or after all successful
351 file printing is complete (when printing to a terminal).