PR(1) — USER COMMANDS
NAME
pr − prepare file(s) for printing, possibly in multiple columns
SYNOPSIS
pr [ −n ] [ +n ] [ −h string ] [ −wn ] [ −f ] [ −ln ] [ −t ] [ −sn ] [ −m ] [ filename ] ...
DESCRIPTION
pr prepares one or more files’s for printing. The output is separated into pages headed by a date, the name of the file or a specified header, and the page number. pr prints its standard input if there are no file arguments. Formfeed characters in the input files cause page breaks in the output, as expected.
Inter-terminal messages via write are forbidden during a pr.
OPTIONS
Options apply to all following file’s but may be reset between file’s:
−n Produce n-column output. For example:
Printofin
theonethree
linesfilecolumns.
This option overrides the −t option (see below).
+n Begin printing with page n.
−h string
Use string as a header for the page instead of the default header.
−wn For purposes of multi-column output, take the width of the page to be n characters instead of the default 72.
−f Use formfeeds instead of newlines to separate pages. A formfeed is assumed to use up two blank lines at the top of a page. Thus this option does not affect the effective page length.
−ln Take the length of the page to be n lines instead of the default 66.
−t Do not print the 5-line header or the 5-line trailer normally supplied for each page. Formfeed characters are not generated when this option is used, even if the −f option was used. The −t option is intended for applications where the results should be directed to a file for further processing.
−sc Separate columns by the single character c instead of by the appropriate amount of white space. A missing c is taken to be a tab.
−m Print all file’s simultaneously, each in one column, for example:
PrintPrintPrint
thethethird
lineslinesfile’s
of oflines
filefilego
one.two.here.
EXAMPLES
Print a file called dreadnaught on the printer — this is the simplest use of pr:
tutorial% pr dreadnought | lpr
tutorial%
Produce three laminations of a file called ridings side by side in the output, with no headers or trailers, the results to appear in the file called Yorkshire:
tutorial% pr −m −t ridings ridings ridings > Yorkshire
tutorial%
FILES
/dev/tty? to suspend messages.
SEE ALSO
DIAGNOSTICS
There are no diagnostics when pr is printing on a terminal.
BUGS
The options described above interact with each other in strange and as yet to be defined ways.
Sun Release 3.2 — Last change: 23 September 1985