PR(1)

✨ PR(1) β€” the paginate-and-columnate manual, but make it cute ✨

okay bestie, welcome to PR(1), aka the General Commands Manual entry you're gonna actually read for once πŸ’– This is the glow-up of the pr page, and no, I'm not skipping a single flag, so grab a snack πŸ“


🌸 NAME 🌸

pr β€” paginate or columnate FILE(s) for printing πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

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

πŸŽ€ DESCRIPTION πŸŽ€

paginate or columnate FILE(s) for printing. that's it, that's the whole vibe. it takes your files and makes them all neat and page-shaped so the printer doesn't get confused πŸ’–


πŸ‘‘ OPTIONS πŸ‘‘

so many flags. all of them iconic. none of them skipped. periodt ✨

  • --pages <FIRST_PAGE[:LAST_PAGE]> β€” begin and stop printing with page FIRST_PAGE[:LAST_PAGE]. like, start here, stop there, no extra pages bestie 🫢
  • -h, --header <STRING> β€” use the string header to replace the file name in the header line. your file gets a little name tag makeover πŸ’…
  • -D, --date-format <FORMAT> β€” use date-style FORMAT for the header date. it's giving customizable time stamps ✨
  • -d, --double-space β€” produce output that is double spaced. an extra <newline> character is output following every <newline> found in the input. everything gets breathing room 🌬️
  • -n, --number-lines [<[char][width]>] β€” provide width digit line numbering. the default for width, if not specified, is 5. the number occupies the first width column positions of each text column or each line of -m output. if char (any non-digit character) is given, it is appended to the line number to separate it from whatever follows. the default for char is a <tab>. line numbers longer than width columns are truncated. so they get numbered, and if they're too long they get cut, no cap 😭
  • -N, --first-line-number <NUMBER> β€” start counting with NUMBER at 1st line of first page printed. not me starting at 1 like a rookie πŸ™ˆ
  • -t, --omit-header β€” write neither the five-line identifying header nor the five-line trailer usually supplied for each page. quit writing after the last line of each file without spacing to the end of the page. bye bye headers, bye bye trailers, bye bye filler blank space πŸ‘‹
  • -T, --omit-pagination β€” omit page headers and trailers, eliminate any pagination by form feeds set in input files. full chaos mode, no page breaks allowed πŸ”₯
  • -l, --length <PAGE_LENGTH> β€” override the 66-line default (default number of lines of text 56, and with -F 63) and reset the page length to lines. if lines is not greater than the sum of both the header and trailer depths (in lines), the pr utility shall suppress both the header and trailer, as if the -t option were in effect. so if your page is too smol for the header + trailer combo, pr just ghosts them entirely πŸ’€
  • -r, --no-file-warnings β€” omit warning when a file cannot be opened. we're keeping it peaceful, no negativity in this group chat πŸ•ŠοΈ
  • -F, --form-feed β€” use a <form-feed> for new pages, instead of the default behavior that uses a sequence of <newline>s. different page-break flavor, same slay ⭐
  • -w, --width <width> β€” set the width of the line to width column positions for multiple text-column output only. if the -w option is not specified and the -s option is not specified, the default width shall be 72. if the -w option is not specified and the -s option is specified, the default width shall be 512. okay so it only matters when you've got multiple columns, got it πŸ’œ
  • -W, --page-width <width> β€” set page width to PAGE_WIDTH (72) characters always, truncate lines, except -J option is set, no interference with -S or -s. strict width behavior, lines get truncated, -J is the one exception 🎯
  • -a, --across β€” modify the effect of the - column option so that the columns are filled across the page in a round-robin order (for example, when column is 2, the first input line heads column 1, the second heads column 2, the third is the second line in column 1, and so on). it's giving board-game turn order, everyone gets a turn 🎲
  • --columns <columns> β€” produce multi-column output that is arranged in column columns (the default shall be 1) and is written down each column in the order in which the text is received from the input file. this option should not be used with -m. the options -e and -i shall be assumed for multiple text-column output. whether or not text columns are produced with identical vertical lengths is unspecified, but a text column shall never exceed the length of the page (see the -l option). when used with -t, use the minimum number of lines to write the output. ✨
  • -s, --separator [<char>] β€” separate text columns by the single character char instead of by the appropriate number of <space>s (default for char is the <tab> character). one lil character between columns, so tidy πŸŽ€
  • -S, --sep-string [<string>] β€” separate columns by STRING, without -S: default separator <TAB> with -J and <space> otherwise (same as -S\" \"), no effect on column options. you want a string in between? bet πŸ’…
  • -m, --merge β€” merge files. standard output shall be formatted so the pr utility writes one line from each file specified by a file operand, side by side into text columns of equal fixed widths, in terms of the number of column positions. implementations shall support merging of at least nine file operands. nine files side by side, that's the minimum, and it's iconic πŸ‘‘
  • -o, --indent <margin> β€” each line of output shall be preceded by offset <space>s. if the -o option is not specified, the default offset shall be zero. the space taken is in addition to the output line width (see the -w option below). a little margin, a little room to breathe 🧚
  • -J, --join-lines β€” merge full lines, turns off -W line truncation, no column alignment, --sep-string[=STRING] sets separators. πŸ”₯
  • --help β€” print help information πŸ†˜
  • -e, --expand-tabs <[CHAR][WIDTH]> β€” expand input CHARs (TABs) to tab WIDTH (8). tabs become spaces, the tab erasure is real 🌈
  • -V, --version β€” print version πŸ’–
  • [files] [default: -] β€” the files go here bestie, and if you don't give any, the default is - 🫢

🌟 EXTRA 🌟

if no FILE(s) are given, or if FILE is -, read standard input. so stdin is always on the guest list πŸ’œ

when creating multicolumn output, columns will be of equal width. when using the '-s' option to separate columns, the default separator is a single tab character. when using the '-S' option to separate columns, the default separator is a single space character. equality, tabs, spaces β€” the whole lineup ✨


πŸ’« VERSION πŸ’«

v(uutils coreutils) 0.12.0


🌈 EXAMPLES 🌈

print multiple files with a default header and footer:

pr path/to/file1 path/to/file2 ...

print with a custom centered header:

pr [-h|--header] "header" path/to/file1 path/to/file2 ...

print with numbered lines and a custom date format:

pr [-n|--number-lines] [-D|--date-format] "format" path/to/file1 path/to/file2 ...

print all files together, one in each column, without a header or footer:

pr [-m|--merge] [-T|--omit-pagination] path/to/file1 path/to/file2 ...

print, beginning at page 2 up to page 5, with a given page length (including header and footer):

pr +2:5 [-l|--length] page_length path/to/file1 path/to/file2 ...

print with an offset for each line and a truncating custom page width:

pr [-o|--indent] offset [-W|--page_width] width path/to/file1 path/to/file2 ...
the examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. please note that, as uutils is a work in progress, some examples might fail. πŸ’€ (no shade, it's just still cooking 🍳)

and that's the whole page bestie!! slay, you now know pr better than 90% of people who use it πŸ’–βœ¨ this was PR(1) from the General Commands Manual, sourcing from uutils coreutils version 0.12.0, dated 2026-09-25 β€” mwah, go paginate something gorgeous, ily, bye πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from