User`s guide

1-14
Guide to Printers and Printing
Formatting Files for Printing (pr Command)
The pr command performs simple formatting of the files you sent to be printed. You pipe the
output of the pr command to the qprt command to format your text.
Some useful pr command flags are:
–d Double–spaces the output.
–h ”String Displays the specified string, enclosed in (quotes), instead of the
file name as the page header. The flag and string should be separated
by a space.
–l Lines Overrides the 66–line default and resets the page length to the number
of lines specified by the Lines variable. If the Lines value is smaller than
the sum of both the header and trailer depths (in lines), the header and
trailer are suppressed (as if the –t flag were in effect).
–m Merges files. Standard output is formatted so the pr command writes
one line from each file specified by a File variable, side by side into text
columns of equal fixed widths, based on the number of column
positions. This flag should not be used with the Column flag.
–n
[Width][Charact
er]
Provides line numbering based on the number of digits specified by the
Width variable. The default is 5 digits. If the Character (any non–digit
character) variable is specified, it is appended to the line number to
separate it from what follows on the line. The default character
separator is the ASCII TAB character.
–o Offset Indents each line by the number of character positions specified by the
Offset variable. The total number of character positions per line is the
sum of the width and offset. The default value of Offset is 0.
–sCharacter Separates columns by the single character specified by the Character
variable instead of by the appropriate number of spaces. The default
value for Character is an ASCII TAB character.
–t Does not display the five–line identifying header and the five–line footer.
Stops after the last line of each file without spacing to the end of the
page.
–w Width Sets the number of column positions per line to the value specified by
the Width variable. The default value is 72 for equal–width multicolumn
output. There is no limit otherwise. If the –w flag is not specified and the
–s flag is specified, the default width is 512 column positions.
Column Sets the number of columns to the value specified by the Column
variable. The default value is 1. This option should not be used with the
–m flag. The –e and –i flags are assumed for multicolumn output. A text
column should never exceed the length of the page (see the –l flag).
When this flag is used with the –t flag, use the minimum number of lines
to write the output.
+Page Begins the display with the page number specified by the Page variable.
The default value is 1.
For example, to print a file named prog.c with headings and page numbers on the printer,
enter:
pr prog.c | qprt
This adds page headings to prog.c and sends it to the qprt command. The heading
consists of the date the file was last modified, the file name, and the page number.
For example, to specify a title for a file named prog.c, enter:
pr –h ”MAIN PROGRAM” prog.c | qprt