1 .\" Copyright (c) 1991 Keith Muller.
3 .\" The Regents of the University of California. All rights reserved.
5 .\" This code is derived from software contributed to Berkeley by
6 .\" Keith Muller of the University of California, San Diego.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)pr.1 8.3 (Berkeley) 4/18/94
33 .\" $FreeBSD: src/usr.bin/pr/pr.1,v 1.9.2.9 2002/07/15 07:29:05 keramida Exp $
34 .\" $DragonFly: src/usr.bin/pr/pr.1,v 1.4 2006/03/01 08:01:09 swildner Exp $
36 .Dd September 20, 2001
98 utility is a printing and pagination filter for text files.
99 When multiple input files are specified, each is read, formatted,
100 and written to standard output.
101 By default, the input is separated into 66-line pages, each with
104 A 5-line header with the page number, date, time, and
105 the pathname of the file.
107 A 5-line trailer consisting of blank lines.
110 If standard output is associated with a terminal,
111 diagnostic messages are suppressed until the
113 utility has completed processing.
115 When multiple column output is specified,
116 text columns are of equal width.
117 By default text columns are separated by at least one
119 Input lines that do not fit into a text column are truncated.
120 Lines are not truncated under single column output.
122 In the following option descriptions, column, lines, offset, page, and
123 width are positive decimal integers and gap is a nonnegative decimal integer.
126 Begin output at page number
128 of the formatted input.
130 Produce output that is
132 wide (default is 1) that is written vertically
133 down each column in the order in which the text
134 is received from the input file.
140 This option should not be used with
144 the minimum number of lines is used to display the output.
145 (To columnify and reshape text files more generally and without additional
150 Modify the effect of the
152 option so that the columns are filled across the page in a round-robin order
153 (e.g., when column is 2, the first input line heads column
154 1, the second heads column 2, the third is the second line
156 This option requires the use of the
160 Produce output that is double spaced.
163 character is output following every
172 to the next greater column
173 position specified by the formula
180 is zero or is omitted the default is 8.
183 characters in the input are expanded into the appropriate
186 If any nondigit character,
188 is specified, it is used as the input tab character.
192 character for new pages,
193 instead of the default behavior that uses a
200 but pause before beginning the first page if standard output is a terminal.
211 In output, replace multiple
218 reach column positions
224 is zero or omitted, default
226 settings at every eighth column position
228 If any nondigit character,
230 is specified, it is used as the output
236 specified as argument instead of one found in environment.
237 Use "C" to reset locale to default.
239 Override the 66 line default and reset the page length to
243 is not greater than the sum of both the header and trailer
244 depths (in lines), the
246 utility suppresses output of both the header and trailer, as if the
248 option were in effect.
250 Merge the contents of multiple files.
251 One line from each file specified by a file operand is
252 written side by side into text columns of equal fixed widths, in
253 terms of the number of column positions.
254 The number of text columns depends on the number of
255 file operands successfully opened.
256 The maximum number of files merged depends on page width and the
257 per process open file limit.
269 digit line numbering.
272 if not specified, is 5.
273 The number occupies the first
275 column positions of each text column or each line of
280 (any nondigit character) is given, it is appended to the line number to
281 separate it from whatever follows.
286 Line numbers longer than
288 columns are truncated.
290 Each line of output is preceded by
295 option is not specified, the default is zero.
296 The space taken is in addition to the output line width.
298 Pause before each page if the standard output is a terminal.
300 will write an alert character to standard error and wait for a carriage
301 return to be read on the terminal.
303 Write no diagnostic reports on failure to open a file.
305 Separate text columns by the single character
307 instead of by the appropriate number of
315 Print neither the five-line identifying
316 header nor the five-line trailer usually supplied for each page.
317 Quit printing after the last line of each file without spacing to the
320 Set the width of the line to
322 column positions for multiple text-column output only.
325 option is not specified and the
327 option is not specified, the default width is 72.
330 option is not specified and the
332 option is specified, the default width is 512.
334 A pathname of a file to be printed.
337 operands are specified, or if a
341 the standard input is used.
342 The standard input is used only if no
344 operands are specified, or if a
352 option does not allow the option letter to be separated from its
353 argument, and the options
358 require that both arguments, if present, not be separated from the option
363 utility exits 0 on success, and 1 if an error occurs.
365 Error messages are written to standard error during the printing
366 process (if output is redirected) or after all successful
367 file printing is complete (when printing to a terminal).
371 receives an interrupt while printing to a terminal, it
372 flushes all accumulated error messages to the screen before