Linux and Unix pr command
Formats a file to make it look better when printed.
pr [ + page ] [ -column ] [-a] [-d] [-F] [-m] [-r] [-t] [ -e [char ] [ gap ] ] [ -h header ] [ -i [ char ] [ gap ] ] [ -l lines ] [ -n [ char ] [ width ] ] [ -o offset ] [ -s [ char ] ] [ -w width ] [ -f] [-p] [ file ... ]
|-column||Produce multi-column output that is arranged in column columns (default is 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 -e and -i options will be assumed for multiple text-column output. Whether or not text columns are produced with identical vertical lengths is unspecified, but a text column will 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.|
|-a||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 forth).|
|-d||Produce output that is double-spaced; append an extra NEWLINE character following every NEWLINE character found in the input.|
|-F||Fold the lines of the input file. When used in multi-column mode (with the -a or -m options), lines will be folded to fit the current column's width; otherwise, they will be folded to fit the current line width (80 columns).|
|-m||Merge files. Standard output will be formatted so pr writes one line from each file specified by file , side by side into text columns of equal fixed widths, in terms of the number of column positions. Implementations support merging of at least nine file s.|
|-r||Write no diagnostic reports on failure to open files.|
|-t||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.|
|-e [char][gap]||Expand each input TAB character to the next greater column position specified by the formula n *gap+1, where n is an integer >0. If gap is 0 or is omitted, it defaults to 8. All TAB characters in the input will be expanded into the appropriate number of SPACE characters. If any non-digit character, char, is specified, it will be used as the input tab character.|
|-h header||Use the string header to replace the contents of the file operand in the page header.|
|-i [char][gap]||In output, replace SPACE characters with TAB characters wherever one or more adjacent SPACE characters reach column positions gap+1, 2*gap+1, 3*gap+1, and so forth. If gap is 0 or is omitted, default TAB settings at every eighth column position are assumed. If any non-digit character, char, is specified, it will be used as the output TAB character.|
|-l lines||Override the 66-line default and reset the page length to lines. If lines is not greater than the sum of both the header and trailer depths (in lines), pr will suppress both the header and trailer, as if the -t option were in effect.|
|-n [char][width]||Provide width-digit line numbering (default for width is 5). The number will occupy the first width column positions of each text column of default output or each line of -m output. If char (any non-digit character) is given, it will be appended to the line number to separate it from whatever follows (default for char is a TAB character).|
|-o offset||Each line of output will be preceded by offset <space>s. If the -o option is not specified, the default offset is 0. The space taken will be in addition to the output line width (see -w option below).|
|-s [char]||Separate text columns by the single character char instead of by the appropriate number of SPACE characters (default for char is the TAB character).|
|-w [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 is 72. If the -w option is not specified and the -s option is specified, the default width is 512.
For single column output, input lines will not be truncated.
|-f||Use a FORMFEED character for new pages, instead of the default behavior that uses a sequence of NEW- LINE characters. Pause before beginning the first page if the standard output is associated with a terminal.|
|-p||Pause before beginning each page if the standard output is directed to a terminal (pr will write an ALERT character to standard error and wait for a carriage-return character to be read on /dev/tty).|
ls -a | pr -n -h "Files in $(pwd)"
Print a numbered list of all files in the current directory.