Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

User Commands (k - l) lp(1)
DESCRIPTION
The lp command sends the specied les and associated information (collectively called a
request) to a line printer for printing.
The lp command copies input les to an output printer device through the Guardian spooler sub-
system. The system default destination is a printer device or a Guardian spooler location. The
system default destination is congured by the system operator at system startup. If the system
default destination becomes unavailable or if a valid destination cannot be found, the lp com-
mand exits with a nonzero exit status.
Files are always rst copied to the spooling area. From there they are sent to the printer. Depend-
ing on printer availability, les specied in a print request may not actually be sent to a printer
from the spooling area until after the lp command successfully exits. When a job is sent to the
printer device, each print job has exclusive access to the printer device and cannot be interrupted.
Operands
file The pathname of a le to be printed. If no le operands are specied, or if a le
operand is specied as a - (hyphen), the standard input le is used. Guardian les are
preceded with the /G naming convention. The lp command must have read permission
to the le or it will return an error.
Standard Input Files
The standard input les can be OSS text les (lecode 180), Guardian EDIT les (lecode 101),
compiler listing les (lecode 129), and PostScript les (lecode 0). Using input les other than
the standard input le may produce unexpected results.
Standard input is used only if no le argument is specied or if le is specied as a - (hyphen).
Environment Variables
LANG Provides a default value for the internationalization variables that are unset or null. If
the LANG variable is unset or null, the corresponding value from the implementation-
specic default locale is used. If any of the internationalization variables contain an
invalid setting, the lp command behaves as if none of the variables have been dened.
LC_ALL
When set with a nonempty string, overrides the values of all other internationalization
variables.
LC_CTYPE
Determines the locale for the interpretation of sequences of bytes of text data as char-
acters (for example, single-byte as opposed to multibyte characters in arguments and
input les).
LC_MESSAGES
Determines the locale to be used to affect the format and contents of diagnostic mes-
sages written to the standard error le and informative messages written to the standard
output le.
LC_TIME
Determines the format and contents of date and time strings displayed in the lp com-
mand banner page.
LPDEST
Names the output device or destination. If LPDEST is not set, the PRINTER environ-
ment variable is used. The -d variable takes precedence over LPDEST.If-d is not
specied and LPDEST contains a value that is not a valid destination, the lp command
exits with an error.
527188-003 Hewlett-Packard Company 571