pr(1) pr(1)NAME pr - format text for a print device SYNOPSIS pr [+k] [-k] [-a] [-d] [-eck] [-f] [-h head] [-ick] [-lk] [-m] [-nck] [-ok] [-p] [-r] [-sc] [-t] [-wk] [file...] DESCRIPTION pr formats the named files on the standard output. If file is -, or if no files are specified, the standard input is assumed. By default, the listing is separated into pages, each headed by the page number, a date and time, and the name of the file. By default, columns are of equal width, separated by at least one space; lines which do not fit are truncated. If the -s flag option is used, lines are not truncated and columns are separated by the separation character. If the standard output is associated with a terminal, error messages are withheld until pr has completed formatting. FLAG OPTIONS The flag options below may appear singly or may be combined in any order: +k Begin formatting with page k (default is 1). -k Produce k-column output (default is 1). The flag op- tions -e and -i are assumed for multicolumn output. Also, the -k flag option must be used if the -w (column width) flag option is used. -a Print multicolumn output across the page. -m Merge and format all files simultaneously, one per column (overrides the -k, and -a flag options). -d Double-space the output. -eck Expand input tabs to character positions k+1, 2*k+1, 3*k+1, etc. If k is 0 or is omitted, default tab settings at every eighth position are assumed. Tab characters in the input are expanded into the ap- propriate number of spaces. If c (any nondigit char- acter) is given, it is treated as the input tab char- acter (default for c is the tab character). -ick In output, replace white space wherever possible by inserting tabs to character positions k+1, 2*k+1, 3*k+1, etc. If k is 0 or is omitted, default tab settings at every eighth position are assumed. If c April, 1990 1
pr(1) pr(1)(any nondigit character) is given, it is treated as the output tab character (default for c is the tab character). -nck Provide k-digit line numbering (default for k is 5). The number occupies the first k+1 character positions of each column of normal output or each line of -m output. If c (any nondigit character) is given, it is appended to the line number to separate it from whatever follows (default for c is a tab). -wk For multicolumn output, set the width of a line to k character positions instead of the default 72 charac- ters. This flag option must be used with the -k (number of columns) flag option. -ok Offset each line by k character positions (default is 0). The number of character positions per line is the sum of the width and offset. -lk Set the length of a page to k lines (default is 66). -h Use the next argument as the header instead of the file name. -p Pause before beginning each page if the output is directed to a terminal (pr will ring the bell at the terminal and wait for a carriage return). -f Use form feed character for new pages (default is to use a sequence of line-feeds). Pause before begin- ning the first page if the standard output is associ- ated with a terminal. -r Print no diagnostic reports on failure to open files. -t Print neither the five-line identifying header nor the five-line trailer normally supplied for each page. Quit formatting after the last line of each file without spacing to the end of the page. -sc Separate columns by the single character c instead of by the appropriate number of spaces (default for c is a tab). EXAMPLES pr -3dh "file list" file1 file2 formats file1 and file2 as a double-spaced, three-column listing headed by ``file list''. pr -e9 -t < file1 > file2 2 April, 1990
pr(1) pr(1)writes file1 on file2, expanding tabs to columns 10, 19, 28, 37, ... . FILES /bin/pr /dev/tty* SEE ALSO cat(1), fmt(1), lp(1), lpr(1). April, 1990 3