[Next] [Previous] [Up] [Top] [Contents]

4.2 Print Commands

4.2.4 pr - prepare files for printing

pr prints header and trailer information surrounding the formatted file. You can specify the number of pages, lines per page, columns, line spacing, page width, etc. to print, along with header and trailer information and how to treat <tab> characters.

Syntax

pr [options] file

Common Options

+page_number start printing with page page_number of the formatted input file

-column number of columns

-a modify -column option to fill columns in round-robin order

-d double spacing

-e[char][gap] tab spacing

-h header_string header for each page

-l lines lines per page

-t don't print the header and trailer on each page

-w width width of page

Examples

The file containing the list of P. G. Wodehouse's Lord Emsworth books could be printed, at 14 lines per page (including 5 header and 5 (empty) trailer lines) below, where the -e option specifies the <tab> conversion style:

% pr -l 14 -e42 wodehouse

Apr 29 11:11 1996 wodehouse_emsworth_books Page 1

Something Fresh [1915] Uncle Dynamite [1948]

Leave it to Psmith [1923] Pigs Have Wings [1952]

Summer Lightning [1929] Cocktail Time [1958]

Heavy Weather [1933] Service with a Smile [1961]

Apr 29 11:11 1996 wodehouse_emsworth_books Page 2

Blandings Castle and Elsewhere [1935] Galahad at Blandings [1965]

Uncle Fred in the Springtime [1939] A Pelican at Blandings [1969]

Full Moon [1947] Sunset at Blandings [1977]


Introduction to Unix - 14 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]