A list of available printers can be found in table 1.2 on page . The general form of the lpr command is:
lpr -Pprintername filename
For example, to print the postscript file poem.ps on the printer stu you would type
% lpr -Pstu poem.ps
Similarly, you could print the text file poem.txt by typing
% lpr -Pstu poem.txt
This will print the file containing a title (in this case poem.txt), border, and a heading consisting of your login name.
To print the same file in single sided mode without your login name, append .sgl to the end of the printer name:
% lpr -Pstu.sgl poem.txt
Similarly, appending .dup will print out the file using both sides of the paper without your login name being displayed:
% lpr -Pstu.dup poem.txt
If you want some other layout, you will have to convert the text file to postscript yourself. You can do this using the program aps. The general form of this command is:
aps [flags] textfile
It will print out the text file in postscript format. Given no flags, the postscript will be exactly as it would if you send the text straight to the printer, but in portrait. aps puts its output on the standard output, so you will probably want to redirect it to a file, or straight to the lpr command.
Here are some examples of how you could print the file poem.txt on the student laser printer:
% aps poem.txt | lpr -Pstu % aps poem.txt > poem.ps; lpr -Pstu poem.ps
To print a text file with no border or header in portrait form you can use:
aps -~B -P -~H file.txt | lpr -Pstu
Here, the `
~' option is used to turn off the border (B) and header (H). For more information on file printing and viewing, refer to section 2.3.6 on page .