Forrest logo
back to the lpr tool

lpr:tldr:4cc23

lpr: Print multiple pages per sheet.
$ lpr -o number-up=${select} ${filename}
try on your machine

The command "lpr -o number-up=${select} ${filename}" is used to print a designated file in a specific layout using the "lpr" command. Here is a breakdown of the command:

  • "lpr" is the command used to send files to a printer for printing.
  • "-o" is a flag that allows you to set additional options for the print job.
  • "number-up=${select}" is an option specified with the "-o" flag, which sets the number of pages to be printed on a single physical page. The "${select}" variable is used to dynamically set the value. It can be replaced with a specific number, i.e., "2" to print two pages on one physical page.
  • "${filename}" is a placeholder for the name of the file you want to print. You should replace it with the actual file name or path.

In summary, this command instructs the printer to print a specified file (${filename}) with a specific layout determined by the value of the "${select}" variable, which should be replaced with the desired number of pages to be printed on each physical page.

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