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