Using LPR switches

The attributes and options listed in the RFC1179 document, as well as custom switches, have been implemented in the LPR utility. The LPR option switch syntax is a “-” immediately followed by the case-sensitive switch characters, a space, then the attribute (if any). Separate switch-attribute pairs with a space. Switches are case-sensitive.

For example, use the LPR command to print five copies of the plot file test.txt from the 999.9.999.9 network address to printer1: lpr -S999.9.999.9 -Pprinter1 -Og test.txt,5

Switch

Attribute

Description

-Of

 

Print formatted file as a plain text file with page breaks

-Ol

 

Print with control characters

-Op

 

Print with “pr” format (ASCII)

-Or

 

Print with FORTRAN carriage control; also supports ASA

-1

 

Troff R font (works only with -Ot, -On, -Od switches)

-2

 

Troff I font (works only with –Ot, -On, -Od switches)

-3

 

Troff B font (works only with -Ot, -On, -Od switches)

-4

 

Troff S font (works only with -Ot, -On, -Od switches)

-Oc

 

Plot CIF file

-Od

 

Print DVI file

-Og

 

Print Plot file

-On

 

Print ditroff output file

-Ot

 

Print troff output file

-Ov

 

Verbatim print of binary file

-Ox

ID

User-defined cooperative client-server file name extensions; ID follows the switch character, a space, then file name

-C

Class

Job class used on the header page

-E

 

RCF; receive control file last

-I

Number

Number of spaces to indent (works only with –Ol or –Of switches)

-J

Jobname

Job name for banner page

-L

[Username]

Print banner page

-M

Mailbox

Send mail to “mailbox@hostname” when printed

-N

Name

Specifies a different file name

-T

Titlename

Title to be printed (works only with –Op switch)

-U

 

Send last/only data file per job using unspecified length

-W

Number

Set column width (works only with –Of, -Ol, -Op, -Or switches)

-X

[Switches]

User-defined cooperative client-server extensions

See also: