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. All advertising materials mentioning features or use of this software
17 .\" must display the following acknowledgement:
18 .\" This product includes software developed by the University of
19 .\" California, Berkeley and its contributors.
20 .\" 4. 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 .\" @(#)pr.1 8.3 (Berkeley) 4/18/94
37 .\" $FreeBSD: src/usr.bin/pr/pr.1,v 1.22 2005/01/18 13:43:52 ru Exp $
101 utility is a printing and pagination filter for text files.
102 When multiple input files are specified, each is read, formatted,
103 and written to standard output.
104 By default, the input is separated into 66-line pages, each with
107 A 5-line header with the page number, date, time, and
108 the pathname of the file.
110 A 5-line trailer consisting of blank lines.
113 If standard output is associated with a terminal,
114 diagnostic messages are suppressed until the
116 utility has completed processing.
118 When multiple column output is specified,
119 text columns are of equal width.
120 By default text columns are separated by at least one
122 Input lines that do not fit into a text column are truncated.
123 Lines are not truncated under single column output.
125 In the following option descriptions, column, lines, offset, page, and
126 width are positive decimal integers and gap is a nonnegative decimal integer.
129 Begin output at page number
131 of the formatted input.
133 Produce output that is
135 wide (default is 1) that is written vertically
136 down each column in the order in which the text
137 is received from the input file.
143 This option should not be used with
147 the minimum number of lines is used to display the output.
148 (To columnify and reshape text files more generally and without additional
153 Modify the effect of the
155 option so that the columns are filled across the page in a round-robin order
156 (e.g., when column is 2, the first input line heads column
157 1, the second heads column 2, the third is the second line
159 This option requires the use of the
163 Produce output that is double spaced.
166 character is output following every
175 to the next greater column
176 position specified by the formula
183 is zero or is omitted the default is 8.
186 characters in the input are expanded into the appropriate
189 If any nondigit character,
191 is specified, it is used as the input tab character.
195 character for new pages,
196 instead of the default behavior that uses a
203 but pause before beginning the first page if standard output is a terminal.
214 In output, replace multiple
221 reach column positions
227 is zero or omitted, default
229 settings at every eighth column position
231 If any nondigit character,
233 is specified, it is used as the output
239 specified as argument instead of one found in environment.
240 Use "C" to reset locale to default.
242 Override the 66 line default and reset the page length to
246 is not greater than the sum of both the header and trailer
247 depths (in lines), the
249 utility suppresses output of both the header and trailer, as if the
251 option were in effect.
253 Merge the contents of multiple files.
254 One line from each file specified by a file operand is
255 written side by side into text columns of equal fixed widths, in
256 terms of the number of column positions.
257 The number of text columns depends on the number of
258 file operands successfully opened.
259 The maximum number of files merged depends on page width and the
260 per process open file limit.
272 digit line numbering.
275 if not specified, is 5.
276 The number occupies the first
278 column positions of each text column or each line of
283 (any nondigit character) is given, it is appended to the line number to
284 separate it from whatever follows.
289 Line numbers longer than
291 columns are truncated.
293 Each line of output is preceded by
298 option is not specified, the default is zero.
299 The space taken is in addition to the output line width.
301 Pause before each page if the standard output is a terminal.
303 will write an alert character to standard error and wait for a carriage
304 return to be read on the terminal.
306 Write no diagnostic reports on failure to open a file.
308 Separate text columns by the single character
310 instead of by the appropriate number of
318 Print neither the five-line identifying
319 header nor the five-line trailer usually supplied for each page.
320 Quit printing after the last line of each file without spacing to the
323 Set the width of the line to
325 column positions for multiple text-column output only.
328 option is not specified and the
330 option is not specified, the default width is 72.
333 option is not specified and the
335 option is specified, the default width is 512.
337 A pathname of a file to be printed.
340 operands are specified, or if a
344 the standard input is used.
345 The standard input is used only if no
347 operands are specified, or if a
355 option does not allow the option letter to be separated from its
356 argument, and the options
361 require that both arguments, if present, not be separated from the option
366 utility exits 0 on success, and 1 if an error occurs.
370 receives an interrupt while printing to a terminal, it
371 flushes all accumulated error messages to the screen before
374 Error messages are written to standard error during the printing
375 process (if output is redirected) or after all successful
376 file printing is complete (when printing to a terminal).
377 .Sh LEGACY DESCRIPTION
378 The last space before the tab stop is replaced with a tab character.
379 In legacy mode, it is not.
381 For more information about legacy mode, see
402 utility does not recognize multibyte characters.