[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

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][Character] 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.

The following is a list of examples of how pr command flags can be used:

See the pr command in the AIX 5L Version 5.2 Commands Reference for the complete syntax.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]