Convert text files into a format suitable for printing
pr command is used to convert text files into a format suitable for printing. It can split larger files into multiple pages for printing, and add titles to each page.
pr(option)(parameter)
-e<tab[width]>(--expand-tabs=<tab[width]>): Convert tab characters (or tab characters) to spaces. If width is specified, tab Characters are converted to width characters, the default is 8;
-h<title>: Specify a title for the page;
-i<out-tab-char[out-tab-width>(--output-tabs<out-tab-char[out-tab-width]>): Replace spaces with tabs in the output, you can specify an alternative tab (default is tab) and width (default is 8);
-l<number of lines>: specifies the number of lines per page;
-n<delimiter[number]>: Number the columns, or use the -m option to number the rows, append the delimiter to each number, which defaults to a tab character and limits the size of the number, which defaults to 5;
-o<width>: Set the width for the left margin;
-s<separator>(--separator<separator>): Use the specified separator (default is tab) instead of spaces to separate columns;
-S<string>(--sep-string<string>): Use the specified string (default is the tab character of -J) or a space to separate columns;
-w<page width>: Set the page width for multi-column output, the default is 72;
-W<page width>: Set the page width to a fixed value, the default is 72;
-J (--join-lines): Join entire lines, ignore -W if set;
-num_cols: num_cols is an integer, specifying the num_cols column for printing a file with n lines on a page;
-m (--merge): Print all files, one file per column.
-f(-F)(--form-feed): Use form feed character instead of newline character;
-r (--no-file-warnings): silent when the input file cannot be opened;
-t: Limit the filling of headers, footers and footers;
-T (--omit-pagination): similar to -t, but also restricts paging;
-v(--show-non-printing): Convert non-printable characters to octal backslash format;
-d: double spacing;
-a (--across): interlaced printing, that is, horizontal printing instead of vertical printing;
-c (--show-control-chars): Convert control characters to hat symbols (such as ^C) and other non-printable characters to octal backslash format;
--help: print help information and exit;
--version: Print version information and exit.
File: The file whose format needs to be converted.