pr
The "pr" command line tool stands for "print" and is used to format and print files for output. It is available in Unix-based operating systems, including Linux and macOS. The primary purpose of "pr" is to paginate and format the input file before printing it. It allows users to specify the number of columns, lines per page, page headers, footers, and line numbering. With "pr", users can control the appearance of the output and customize it to their needs. The tool is also capable of expanding and compressing input files to fit the specified page size. "pr" supports different output formats, including single or double-spaced output, tabular format, or columnar format. Additionally, it offers options to suppress header and footer lines, as well as control page breaks. The command can be used in combination with other text processing commands to manipulate, sort, and filter the input before printing. Overall, "pr" provides users with a flexible and customizable way to format and print files from the command line.
List of commands for pr:
-
pr:tldr:141cf pr: Print with numbered lines and a custom date format.$ pr -n -D "${format}" ${file1} ${file2} ${file3}try on your machineexplain this command
-
pr:tldr:2d7ce pr: Print with a custom centered header.$ pr -h "${header}" ${file1} ${file2} ${file3}try on your machineexplain this command
-
pr:tldr:a94bd pr: Print multiple files with a default header and footer.$ pr ${file1} ${file2} ${file3}try on your machineexplain this command
-
pr:tldr:bda72 pr: Print with an offset for each line and a truncating custom page width.$ pr -o ${offset} -W ${width} ${file1} ${file2} ${file3}try on your machineexplain this command
-
pr:tldr:c45db pr: Print, beginning at page 2 up to page 5, with a given page length (including header and footer).$ pr +${2}:${5} -l ${page_length} ${file1} ${file2} ${file3}try on your machineexplain this command
-
pr:tldr:cf7fc pr: Print all files together, one in each column, without a header or footer.$ pr -m -T ${file1} ${file2} ${file3}try on your machineexplain this command