Specifications

1-17
Printing Overview
Formatting files for printing (pr command)
Use the pr command to perform simple formatting of the files you send 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 ][
Character ]
Provides line numbering based on the number of digits specified by the
Width variable. The default is 5 digits. If the Character (any nondigit
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.
–s Character 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.
See the pr command in the AIX 5L Version 5.3 Commands Reference for the complete
syntax.
The following is a list of examples of how pr command flags can be used:
To print a file named prog.c with headings and page numbers on the printer, enter:
pr prog.c | qprt