PR(1)

πŸ“¦ version 1.053, in alpine 3.24

πŸ’… pr(1): convert text files for printing πŸ’…

pr β€” convert text files for printing. This is the pr(1) page, bestie, straight out of the User Contributed Perl Documentation section. It's giving classic Unix but make it print-coded πŸŽ€.


✨ SYNOPSIS ✨

       "pr [-columns] [+page] [-adFfrts] [-n[char][count]] [-schar] [-ei] [-w
       width]"      "[-o count] [-l length] [-h text] files"

       "pr -m [+page] [-adFfrts] [-n[char][count]] [-schar] [-ei] [-w width]"
            "[-o count] [-l length] [-h text] files"

πŸ’– DESCRIPTION πŸ’–

Okay so pr formats text into fixed-length pages with headers, multiple columns, and other options suitable for hardcopy output. Basically: it makes your text act like it's about to get printed, and honestly? Main character energy πŸ–¨οΈβœ¨.

πŸŽ€ OPTIONS πŸŽ€

pr accepts the following option (yes, it says β€œoption” singular β€” iconic):

  • -columns β€” Causes pr to print text in columns down the page. Important vibe check: pr does not attempt to fold lines which are too long to fit in their column, and long lines and control characters will affect output. Column width decreases as the number of columns goes up. -w should be used to make the page wider.
  • +page β€” Begin numbering pages at page number page.
  • -a β€” Multiple columns are filled from left-to-right down the page.
  • -m β€” Each input file is given a column in the output, and printing continues until all input files are exhausted.
  • -d β€” Output is double-spaced.
  • -f β€” Formfeed characters are used instead of trailing blank lines to control page length. -F is a synonym for -f.
  • -r β€” Do not print a message if files cannot be opened.
  • -t β€” Suppress the 5-line header and 5-line trailer on each page.
  • -schar β€” The single character char will be used to separate multi-column output. Note that the columns are no-longer fixed-width with this option.
  • -n[char[count]] β€” Precede each column with a line number. count is the desired width of the line numbering (numbers too large are truncated). char can be used to separate numbers from the output line; tab is used if char is not specified.
  • -e β€” Not implemented in this version, accepted for comptability.
  • -i β€” Not implemented in this version, accepted for comptability.
  • -w width β€” Width of the page, in characters. Note that excessively long lines are not folded or truncated--they simply keep printing. This may foul column alignment. Defaults to 72.
  • -l length β€” Length of the page, in lines. Defaults to 66.
  • -o count β€” Offset each line with a left margin count characters wide. This is in addition to the width specified with the -w option.
  • -h text β€” Use text in the header for each file, instead of the file name.
⚠️ tiny warning bestie: -e and -i are not implemented in this version β€” they're just accepted for comptability. Respect the lore 😭.

πŸ’€ BUGS πŸ’€

The -e and -i switches are not implemented in this version.

Input which contains carriage returns, or other ASCII control characters will affect the alignment of columns, and may affect page-length counts. This includes overprinting and backspaces.

Excessively long lines will cause pr to mis-align columns in multi-column output.


πŸ‘‘ AUTHOR πŸ‘‘

The Perl implementation of pr was written by Clinton Pierce, clintp@geeksalad.org.


This program is Copyright 1999, by Clinton Pierce.

Freely redistributable under the Perl Artistic License.


okay bye bestie β€” this page is PR(1) from perl v5.42.2, dated 2026-02-15. go format some text and slay πŸ’–βœ¨

πŸ“¦ where this page comes from