Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
User Commands (k - l) lp(1)
Preprocessing File Data
The lp command does not preprocess data in Guardian EDIT files, compiler listing files, and
PostScript files. lp performs limited preprocessing of the control characters in OSS ASCII text
files. For example, line feed control characters signify the end of a record and form feed control
characters signify a page eject. Because lp has limited capability to handle all of the control
characters correctly (for example, tabs and backspaces), use the pr command to preprocess the
file data before invoking lp. lp translates unrecognizable control characters to blank characters.
EXAMPLES
1. To send an OSS text file to a printer using the destination-searching algorithm, enter:
cat file | lp
If the operation is successful, the exit status 0 is returned and a message,
stdin is routed to printer_name with request id id_number
is written to the standard output file.
2. To print multiple files with the destination and the heading for the banner specified,
enter:
lp -d hplp -t "myprint" file1 /G/system/vol/subvol/file
If the operation is successful, the exit status 0 is returned and the following messages are
written to the standard output file:
file 1 is routed to hplp with request id: 1
/G/system/vol/subvol/file is routed to hplp with request id: 2
The header for the banner is "myprint."
EXIT VALUES
The following exit values are returned:
0 All input files were processed successfully.
>0 No output device was available, or an error occurred.
RELATED INFORMATION
Commands: cancel(1), lpstat(1).
STANDARDS CONFORMANCE
Spooling is a Guardian operation.
Extensions have been added to the lp command in order to support the Guardian environment.
527188-003 Hewlett-Packard Company 5−73