The lp(1) utility sends files to a system printer,
identified by -ddest.
The options are as follows:
-b
Binary file; do not convert line-endings to Windows text
format.
-c
Copy the files so the user can modify or delete file
without affecting the operation.
-ddest
Names the output device to which the files will be written. The
destination is specified in a modified Universal Naming Convention
(UNC) format: //SYSTEM/printer. For example, the printer Scrivener
on the system Bartleby would be specified:
//BARTLEBY/Scrivener
This option takes precedence over any destination specified in
the LPDEST or PRINTER environment variables.
-ncopies
Specifies the number of copies of the files to be written.
The lp(1) utility expects that the files are appropriate
for the printer; that is, a printer expecting PostScript receives
PostScript files, a printer expecting text files receives text. Use
the -b option for raw binary files (such as sending PCL
files to an HP-compatible printer).
The lp(1) utility makes use of the following environment
variables:
LPDEST
A default printer queue (in UNC format), which takes precedence
over the one specified in PRINTER.
LP_PRINT
The location of the Windows utility print.exe. If this
variable is set, lp(1) uses this value to run
print.exe; if it is not set, lp(1) looks for the file
%SYSTEMDIR%/system32/print.exe, checking for different
cases. (The %SYSTEMDIR% is the directory in which Windows is
installed.)
PRINTER
The default printer queue (in UNC format). This queue is used
unless LPDEST is set or the -d option is used.