Posted On 2007-05-02 by FortyPoundHead
Keywords: Command Reference
Tags: Linux Commandline Linux
Views: 1392

Prepare files for printing, printing and pagination filter for text files.
When multiple input files are specified, each is read, formatted, and written to standard output.

pr [options] [file ...]


Begin printing on page beg_pag and end on end-pag if specified.

Print in num_cols number of columns, balancing the number of lines
in the columns on each page.

Print columns horizontally, not vertically.

Convert control characters to hat notation (such as ^C) and other unprintable characters to octal backslash format.
Double space.

Convert tabs (or tab-chars) to spaces.
If width is specified, convert tabs to width characters (default is 8).

Separate pages with form feeds, not newlines.

-h header
Use header for the header instead of the filename.

Replace spaces with tabs on output. Can specify alternative tab character (default is tab) and width (default is 8).

Merge full lines; ignore -W if set.

-l lines
Set page length to lines (default 66). If lines is less than 10, omit headers and footers.

Print all files, one file per column.

Number columns, or, with the -m option, number lines.
Append delimiter to each number (default is a tab) and limit
the size of numbers to digits (default is 5).

-o width
Set left margin to width.

Continue silently when unable to open an input file.

Separate columns with delimiter (default is a tab) instead of spaces.

Separate columns with string. Default is a tab with -J and a space otherwise.

Suppress headers, footers, and fills at end of pages.

Like -t but also suppress form feeds.

Convert unprintable characters to octal backslash format.

-w page_width
Set the page width to page_width characters for multi-column output.
Default is 72.

-W page_width
Set the page width to always be page_width characters.
Default is 72.

A pathname of a file to be printed.
If no file operands are specified, or if a file operand is `-'',
the standard input is used.

Print a help message and then exit.

Print version information and then exit.

About the Author

FortyPoundHead has posted a total of 1974 articles.


Comments On This Post

No comments on this post yet!

Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.

Your IP address is:

Before you can post, you need to prove you are human. If you log in, this test goes away.

Recent Forum Posts

List of Shady Characters
dwirch posted on April 25, 2017 at about 16:39 in Webmaster Stuff

Job Spammer: Bilal Uddin
dwirch posted on April 25, 2017 at about 11:00 in Spammers

Bug Fix: Contact Form Error
dwirch posted on April 21, 2017 at about 11:38 in Site News

Bug Fix: Ophion Time Tracker
dwirch posted on April 9, 2017 at about 11:30 in Site News

Job Spammer: Yogesh Kapadne
dwirch posted on March 31, 2017 at about 8:04 in Spammers

Job Spammer: Sathya Narayana
dwirch posted on March 15, 2017 at about 7:18 in Spammers