info > pr

🖨️ 4.2 'pr': Paginate or columnate files for printing

'pr' writes each FILE ('-' means standard input), or standard input if none are given, to standard output, paginating and optionally outputting in multicolumn format; optionally merges all FILEs, printing all in parallel, one per column.

🚀 Quick Reference

Use CaseCommandDescription
Paginate a file with default headerspr file.txt📄 Adds page breaks, header with date/filename/page number
Print in two columns (down first)pr -2 file.txt📊 Splits text into two equal-width columns
Print across columns (row‑wise)pr -2 -a file.txt📑 Fills columns horizontally instead of vertically
Merge multiple files side by sidepr -m file1.txt file2.txt📋 Prints each file in a separate column
Omit headers and footerspr -t file.txt🚫 Suppresses page headers, retains form feeds
Double space outputpr -d file.txt📝 Inserts blank line between every text line

📖 Synopsis

pr [OPTION]... [FILE]...

📝 Description

By default, a 5‑line header is printed at each page: two blank lines; a line with the date, the file name, and the page count; and two more blank lines. A footer of five blank lines is also printed. The default PAGE_LENGTH is 66 lines. The default number of text lines is therefore 56. The text line of the header takes the form DATE STRING PAGE, with spaces inserted around STRING so that the line takes up the full PAGE_WIDTH. Here, DATE is the date (see the -D or --date-format option for details), STRING is the centered header string, and PAGE identifies the page number. The LC_MESSAGES locale category affects the spelling of PAGE; in the default C locale, it is Page NUMBER where NUMBER is the decimal page number.

Form feeds in the input cause page breaks in the output. Multiple form feeds produce empty pages.

Columns are of equal width, separated by an optional string (default is space). For multicolumn output, lines will always be truncated to PAGE_WIDTH (default 72), unless you use the -J option. For single column output no line truncation occurs by default. Use -W option to truncate lines in that case.

⚙️ Options

The program accepts the following options. Also see *note Common options::.

🚪 Exit Codes

An exit status of zero indicates success, and a nonzero value indicates failure.

pr
🖨️ 4.2 'pr': Paginate or columnate files for printing 🚀 Quick Reference 📖 Synopsis 📝 Description ⚙️ Options 🚪 Exit Codes

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-31 08:06 @216.73.217.152
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^