Forrest logo
back to the lpr tool

lpr:tldr:5ea2b

lpr: Print either a single page (e.g. 2) or a range of pages (e.g. 2–16).
$ lpr -o page-ranges=${select} ${filename}
try on your machine

The command you mentioned is used for printing a specific range of pages of a document using the "lpr" command-line tool. Here is the breakdown of the command:

  • "lpr": This is the command-line utility for sending print jobs to a printer.
  • "-o page-ranges=${select}": This is an option to specify the range of pages to be printed. The value of the "page-ranges" option is "${select}", which typically refers to a user-defined variable or an input field where you provide the desired page range. It allows you to define which pages to print rather than printing all the pages by default. By using "${select}", you are expected to substitute it with the actual page range you want to print.
  • "${filename}": This is a placeholder for the name of the file you want to print. You need to replace "${filename}" with the actual name or path of the file you want to print.

So, when you execute this command, it will invoke the "lpr" command to print the specified range of pages from the given file. Make sure to replace "${select}" with the desired page range and "${filename}" with the actual file you want to print.

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