Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cat(1)

lpr(1mdqs)

more(1)



PR(1)                   COMMAND REFERENCE                   PR(1)



NAME
     pr - print files

SYNOPSIS
     pr [ +num ] [ -num ] [ -a ] [ -d ] [ -e[(char,num)] ] [ -f ]
     [ -h hdr ]
     [ -i[(char,num)] ] [ -l length ] [ -m ] [ -n[(char,num)] ] [
     -o offset ] [ -p ]
     [ -r ] [ -s[char] ] [ -t ] [ -w width ] [ -F ] [ -P ] [ file
     ... ]

DESCRIPTION
     Pr prints 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.  The date and time is that of the last
     modification of the file, except when the standard input is
     read, in which case the current date and time is used.

     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 separation character.

     If the standard output is associated with a terminal, error
     messages are withheld until pr has completed printing.

OPTIONS
     +num
        Begin printing with page num (default is 1).

     -num
        Produce num-column output (default is 1).  The options -e
        and -i are assumed for multi-column output.

     -a Print multi-column output across the page.  Normally,
        multi-column output is printed down the page.

     -d Double-space the output.

     -e[(char,num)]
        Expand input tabs to character positions num+1, 2*num+1,
        3*num+1, etc.  If num is 0 or is omitted, default tab
        settings at every eighth position are assumed.  Tab
        characters in the input are expanded into the appropriate
        number of spaces.  If char (any non-digit character) is
        given, it is treated as the input tab character (default
        for char is the tab character).

     -f Use form-feed character for new pages (default is to use
        a sequence of line-feeds).



Printed 4/6/89                                                  1





PR(1)                   COMMAND REFERENCE                   PR(1)



     -h hdr
        Use hdr as the name to be printed in the header instead
        of the file name.

     -i[(char,num)]
        In output, replace white space wherever possible by
        inserting tabs to character positions num+1, 2*num+1,
        3*num+1, etc.  If num is 0 or is omitted, default tab
        settings at every eighth position are assumed.  If char
        (any non-digit character) is given, it is treated as the
        output tab character (default for char is the tab
        character).

     -l length
        Set the length of a page to length lines (default is 66).

     -m Merge and print all files simultaneously, one per column
        (overrides the -k, and -a options).

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

     -o offset
        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.  -p Pause before beginning
        each page (including the first page) if the output is
        directed to a terminal (pr rings the bell at the terminal
        and waits for a carriage return).

     -r Print no diagnostic reports on failure to open files or
        for empty files.

     -s[char]
        Separate columns by the single character char instead of
        by the appropriate number of spaces (default for char is
        a tab).

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

     -w width
        Set the width of a line to width character positions for
        equal-width multi-column output (default is 72).  The -w
        option has no effect on single-column output.



Printed 4/6/89                                                  2





PR(1)                   COMMAND REFERENCE                   PR(1)



     -F Use 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.

     -P Pause after printing each page if the output is directed
        to a terminal (pr rings the bell at the terminal and
        waits for a carriage return).

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

          pr -3dh "file list" file1 file2

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

          pr -e9 -t <file1 >file2

FILES
     /dev/tty*    To suspend messages

RETURN VALUE
     [NP_ERR]       An error occurred that was not a system
                    error.  Execution terminated.

     [NP_WARN]      An error warranting a warning message
                    occurred. Execution continues.

     [USAGE]        Incorrect command line syntax. Execution
                    terminated.

     [NO_ERRS]      Command completed without error.

CAVEATS
     There are no diagnostics when pr is printing on a terminal.

     Inter-terminal messages via write(1) are forbidden during
     execution of pr.

SEE ALSO
     cat(1), lpr(1mdqs), and more(1).












Printed 4/6/89                                                  3



%%index%%
na:192,68;
sy:260,829;
de:1089,1004;
op:2093,1193;3550,2679;6493,435;
ex:6928,399;
fi:7327,107;
rv:7434,492;
ca:7926,292;
se:8218,160;
%%index%%000000000168

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