Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
User Commands (k - l) lp(1)
DESCRIPTION
The lp command sends the specified files and associated information (collectively called a
request) to a line printer for printing.
The lp command copies input files 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 configured 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 first copied to the spooling area. From there they are sent to the printer. Depend-
ing on printer availability, files specified 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 file to be printed. If no file operands are specified, or if a file
operand is specified as a - (hyphen), the standard input file is used. Guardian files are
preceded with the /G naming convention. The lp command must have read permission
to the file or it will return an error.
Standard Input Files
The standard input files can be OSS text files (filecode 180), Guardian EDIT files (filecode 101),
compiler listing files (filecode 129), and PostScript files (filecode 0). Using input files other than
the standard input file may produce unexpected results.
Standard input is used only if no file argument is specified or if file is specified 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-
specific 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 defined.
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 files).
LC_MESSAGES
Determines the locale to be used to affect the format and contents of diagnostic mes-
sages written to the standard error file and informative messages written to the standard
output file.
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
specified and LPDEST contains a value that is not a valid destination, the lp command
exits with an error.
527188-003 Hewlett-Packard Company 5−71