LP(1)                      OpenBSD Reference Manual                      LP(1)



NAME
       lp - send requests to an LPRng print service

SYNOPSIS
       lp [ -A ] [ -B ] [ -c ] [ -G ] [ -m ] [ -p ] [ -s ] [ -w ] [ -d dest ]
            [ -f form-name [ -d any ] ] [ -H special-handling ]
            [ -n number ] [ -o option ] [ -P page-list ]
            [ -q priority-level ] [ -S character-set [ -d any ] ]
            [ -S print-wheel ] [ -t title ]
            [ -T content-type [ -r ] ] [ -y mode-list ]
            [ -X path ] [ -D debug-options ]
            [ file...  ]

DESCRIPTION
       The LPRng lpr client supports an lp interface when invoked with the lp
       program name.  This is usually done by making a symbolic link to the
       lpr program with the name lp.  This is similar to the ex(1) and vi(1)
       programs.  The supported form of the lp command arranges for the named
       file(s) and associated information (collectively called a request) to
       be printed.  If no file names are specified on the command line, the
       standard input is assumed.  The standard input may be specified along
       with a named file(s) on the command line by listing the file name(s)
       and specifying `-' (dash) for the standard input.  The files will be
       printed in the order in which they appear on the shell command line.

       The LP print service associates a unique request-ID with each request
       and displays it on the standard output.  The job number portion or full
       request-ID can be used later with cancel(1) or lprm(1) when canceling a
       job or when determining its status.  See cancel(1) and lprm(1) for
       details about canceling a request, and lpstat(1) and lpq(1) for
       information about checking the status of a print request.

OPTIONS
       Options to lp always precede any file names, but may be specified in
       any order.  The following options are available for lp:

       -A             Use authenticated transfer.  Note that this is not a
                      standard lp(1) option but has been added for
                      compatibilty with LPRng.  The authentication type is set
                      by the value of the AUTH environment variable.  -B
                      Process jobs using filters specified in the printcap
                      information.  The filter output is combined into a
                      single file and sent to the print spooler.

       -c             Make a copy of the file before printing.  (This has no
                      effect as LPRng always sends jobs immediately to the
                      remote server for printing.)

       -d dest        The print queue or printer to be used.  By default, the
                      destination printer is taken from the command line dest
                      value, then the environment variables PRINTER, LPDEST,
                      NPRINTER, NGPRINTER, then first entry in the printcap
                      information, and and finally the default_printer entry
                      from the configuration file, and then the compile time
                      default.

       -f form-name   Print the request on the form form-name.  This sets the
                      job class to form-name and is similar to the lpr -C
                      option.  -G Process jobs using filters specified in the
                      printcap information.  The filter output for individual
                      files is sent to the print spooler.

       -H special-handling
                      These options are ignored.

       -m             Send mail (see mail(1)) after the files have been
                      printed.  The mail address is taken from the USER
                      enviroment variable.  By default, no mail is sent upon
                      normal completion of the print request.

       -n number      Print number copies (default is 1) of the output.

       -o option      Specify printer-dependent options.  Several such options
                      may be collected by specifying the -o keyletter more
                      than once (-o $option sub 1$ -o $option sub 2$ ... -o
                      $option sub n$), or by specifying the -o keyletter
                      followed by a list of options enclosed in double quotes
                      (that is, -o "$option sub 1$ $option sub 2$ ... $option
                      sub n$").  The following options have a immediate
                      effect; other options are passed as a Z line entry in
                      the control file, i.e. - as an lpr(1) -Z option.

                      nobanner  Do not print a banner page with this request.
                                This is the same as the lpr(1) -h (no header)
                                option.

                      width=number
                                Print this request with page-width set to
                                number.  This is the same as the lpr(1) -w
                                width option.

       -P page-list   Print the pages specified in page-list.  This option is
                      ignored.

       -p             Enable notification on completion of the print request.
                      This option is ignored.

       -q priority-level
                      Assign this request priority-level in the printing
                      queue.  The values of priority-level range from 0, the
                      highest priority, to 25, the lowest priority.  If a
                      priority is not specified, the default for the print
                      service is used, as assigned by the system
                      administrator.  A priority limit may be assigned to
                      individual users by the system administrator.  The
                      numerical values are translated to corresponding letter
                      priority values.

       -s             Suppress messages from lp such as those that begin with
                      "request id is..."
       -S character-set
       -S print-wheel Print this request using the specified character-set or
                      print-wheel.  The options are passed as an lpr(1) -Z
                      option.

       -t title       Print title on the banner page of the output.  If title
                      is not supplied the name of the file is printed on the
                      banner page.  Enclose title in quotes if it contains
                      blanks.

       -T content-type [-r]
                      Print the request on a printer that can support the
                      specified content-type.  The content-type is passed as
                      an lpr(1) -Z option.

       -w             Write a message on the user's terminal after the files
                      have been printed.  This option is ignored.

       -X path        Filter individual job files using the specified program
                      and send the filter output to the print spooler.

       -y mode-list   Print this request according to the printing modes
                      listed in mode-list.  The mode-list-type is passed as an
                      lpr(1) -Z option.

       -D debug-optios
                      A list of debug options for the program.  These can be a
                      number (debug level) or keyword and level (flag), such
                      as 9, network, network+2, etc.

OPERANDS
       The following operands are supported by lp:

       file           A path name of a file to be output.  If no file operands
                      are specified, or if a file operand is -, the standard
                      input will be used.  The - option must be last in the
                      list.

PRINTCAP INFORMATION
       The printer names and other information is obtained by using a printcap
       file or some other database.  The ${HOME}/.printcap file can be used to
       specify user level options and configuration information.  See
       printcap(5) for more information.

ENVIRONMENT
       By default, the destination printer is taken from the command line dest
       value, then the environment variables PRINTER, LPDEST, NPRINTER,
       NGPRINTER, then first entry in the printcap information, and and
       finally the default_printer entry from the configuration file, and then
       the compile time default.

EXIT STATUS
       The following exit values are returned:

       zero (0)       Successful completion

       nonzero (!= 0) An error occurred.

FILES
       The files used by LPRng are set by values in the LPRng configuration
       file.  The default values are:
       /etc/LPRng/lpd.conf                          LPRng configuration file
       ${HOME}/.printcap                            user printer description file
       /etc/printcap                                printer description file
       /etc/LPRng/lpd.perms                         permissions
       /var/run/lpd                                 lock file for queue control
       /var/spool/lpd                               spool directories
       /var/spool/lpd/QUEUE/control                 queue control
       /var/spool/lpd/QUEUE/log                     trace or debug log file
       /var/spool/lpd/QUEUE/acct                    accounting file
       /var/spool/lpd/QUEUE/status                  status file

SEE ALSO
       lpd.conf(5), lpc(8), lpd(8), lpr(1), lpq(1), lprm(1), printcap(5),
       lpd.perms(5), pr(1), lprng_certs(1), lprng_index_certs(1).

DIAGNOSTICS
       Most of the diagnostics are self explanatory.
       If you are puzzled over the exact cause of failure,
       set the debugging level on (-D5) and run again.
       The debugging information will
       help you to pinpoint the exact cause of failure.

HISTORY
       LPRng is a enhanced printer spooler system with functionality similar
       to the Berkeley LPR software.  The LPRng mailing list is
       lprng@lprng.com; subscribe by sending mail to lprng-request@lprng.com
       with the word subscribe in the body.  The software is available from
       ftp://ftp.lprng.com/pub/LPRng.

AUTHOR
       Patrick Powell <papowell@lprng.com>.



LPRng                             LPRng-3.9.0                            LP(1)
