Forrest logo
back to the lpr tool

lpr:tldr:80565

lpr: Print double-sided either in portrait (long) or in landscape (short).
$ lpr -o sides=${select} ${filename}
try on your machine

The command "lpr -o sides=${select} ${filename}" is used to print a document from the terminal or command line.

Here's what each part of the command means:

  • "lpr" is the command used to print files in Unix-like operating systems.
  • "-o sides=${select}" is an option provided to control the printing format. The "sides" option specifies whether to print on both sides ("duplex") or just one side ("one-sided"). The value of the "sides" option is the variable "${select}" which needs to be set accordingly before executing the command.
  • "${filename}" is the variable that holds the name of the file you want to print. This should be replaced with the actual filename you want to print.

To use this command, you need to provide the actual values for the variables "${select}" and "${filename}". For example, if you want to print a file named "document.pdf" on both sides, you could use the command: "lpr -o sides=duplex document.pdf".

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the lpr tool