Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pr(1) — sysv — mips UMIPS RISC/os 4.52

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cat(1)

pg(1)



PR(1-SysV)          RISC/os Reference Manual           PR(1-SysV)



NAME
     pr - print files

SYNOPSIS
     pr [ [-column] [-wwidth] [-a] ]  [-eck] [-ick] [-drtfp]
     [+page] [-nck]  [-ooffset] [-llength] [-sseparator] [-h
     header] [file ...]

     pr [ [-m] [-wwidth] ]  [-eck] [-ick] [-drtfp] [+page] [-nck]
     [-ooffset] [-llength] [-sseparator] [-h header] file1 file2
     ...


DESCRIPTION
     pr is used to format and print the contents of a file.  If
     file is -, or if no files are specified, pr assumes standard
     input.  pr prints the named files on standard output.

     By default, the listing is separated into pages, each headed
     by the page number, a date and time, and the name of the
     file.  Page length is 66 lines which includes 10 lines of
     header and trailer output.  The header is composed of 2
     blank lines, 1 line of text ( can be altered with -h), and 2
     blank lines;  the trailer is 5 blank lines.  For single
     column output, line width may not be set and is unlimited.
     For multicolumn output, line width may be set and the
     default is 72 columns.  Diagnostic reports (failed options)
     are reported at the end of standard output associated with a
     terminal, rather than interspersed in the output.  Pages are
     separated by series of line feeds rather than form feed
     characters.

     By default, columns are of equal width, separated by at
     least one space; lines which do not fit are truncated. If
     the -s option is used, lines are not truncated and columns
     are separated by the separator character.

     Either -column or -m should be used to produce multi-column
     output.  -a should only be used with -column and not -m.

OPTIONS
     Command line options are

     +page               Begin printing with page numbered page
                         (default is 1).

     -column             Print column columns of output (default
                         is 1).  Output appears as if -e and -i
                         are turned on for multi-column output.
                         May not use with -m.

     -a                  Print multi-column output across the



                         Printed 1/15/91                   Page 1





PR(1-SysV)          RISC/os Reference Manual           PR(1-SysV)



                         page one line per column.  columns must
                         be greater than one.  If a line is too
                         long to fit in a column, it is trun-
                         cated.

     -m                  Merge and print all files simultane-
                         ously, one per column.  The maximum
                         number of files that may be specifed is
                         eight.  If a line is too long to fit in
                         a column, it is truncated.  May not use
                         with -column.

     -d                  Double-space the output.  Blank lines
                         that result from double-spacing are
                         dropped when they occur at the top of a
                         page.

     -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 char-
                         acters in the input are expanded into
                         the appropriate number of spaces.  If c
                         (any non-digit character) is given, it
                         is treated as the input tab character
                         (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 (any non-digit character) is given,
                         it is treated as the output tab charac-
                         ter (default for c is the tab charac-
                         ter).

     -nck                Provide k-digit line numbering (default
                         for k is 5).  The number occupies the
                         first k+1 character positions of each
                         column of single column output or each
                         line of -m output.  If c (any non-digit
                         character) is given, it is appended to
                         the line number to separate it from
                         whatever follows (default for c is a
                         tab).

     -wwidth             Set the width of a line to width charac-
                         ter positions (default is 72).  This is
                         effective only for multi-column output
                         (-column and -m).  There is no line
                         limit for single column output.



 Page 2                  Printed 1/15/91





PR(1-SysV)          RISC/os Reference Manual           PR(1-SysV)



     -ooffset            Offset each line by offset character
                         positions (default is 0).  The number of
                         character positions per line is the sum
                         of the width and offset.

     -llength            Set the length of a page to length lines
                         (default is 66).  -l0 is reset to -l66.
                         When the value of length is 10 or less,
                         -t appears to be in effect since headers
                         and trailers are suppressed.  By
                         default, output contains 5 lines of
                         header and 5 lines of trailer leaving 56
                         lines for user-supplied text.  When
                         -llength is used and length exceeds 10,
                         then length-10 lines are left per page
                         for user supplied text.  When length is
                         10 or less, header and trailer output is
                         omitted to make room for user supplied
                         text.

     -h header           Use header as the text line of the
                         header to be printed instead of the file
                         name.  -h is ignored when -t is speci-
                         fied or -llength is specified and the
                         value of length is 10 or less.  (-h is
                         the only pr option requiring space
                         between the option and argument.)

     -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 single form-feed character for new
                         pages (default is to use a sequence of
                         line-feeds).  Pause before beginning the
                         first page if the standard output is
                         associated with a terminal.

     -r                  Print no diagnostic reports on files
                         that will not open.

     -t                  Print neither the five-line identifying
                         header nor the five-line trailer nor-
                         mally supplied for each page.  Quit
                         printing after the last line of each
                         file without spacing to the end of the
                         page.  Use of -t overrides the -h
                         option.

     -sseparator         Separate columns by the single character
                         separator instead of by the appropriate



                         Printed 1/15/91                   Page 3





PR(1-SysV)          RISC/os Reference Manual           PR(1-SysV)



                         number of spaces (default for separator
                         is a tab).  Prevents truncation of lines
                         on multicolumn output unless -w is
                         specified.

EXAMPLES
     Print file1 and file2 as a double-spaced, three-column list-
     ing headed by ``file list'':

          pr -3dh "file list" file1 file2

     Copy file1 to file2, expanding tabs to columns 10, 19, 28,
     37, ... :

          pr -e9 -t <file1 >file2

     Print file1 and file2 simultaneously in a two-column listing
     with no header or trailer where both columns have line
     numbers:

          pr -t -n file1 | pr -t -m -n file2 -


































 Page 4                  Printed 1/15/91





PR(1-SysV)          RISC/os Reference Manual           PR(1-SysV)



FILES
     /dev/tty* to delay messages enabling them to print at the
     bottom of files rather than interspersed throughout printed
     output.

SEE ALSO
     cat(1), pg(1).
















































                         Printed 1/15/91                   Page 5



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026