ubmlp

NAME

ubmlp – select a printer

SYNOPSIS

ubmlp <command>

DESCRIPTION

ubmlp prompts the user to select a printer from a list of available printers and then executes command piping its output to the selected print spool service.

The list of available printers is held in the file $UBDIR/printers/list (normally /usr/lib/ub/printers/list). The format of this file is a ubitem list where the return value is the printer spool command the display is a description of the printer.

<printer list> ::=<printer def> <printer def> ::=<spool command>:<description>

eg. lp -s : DEFAULT PRINTER lp : NOISY PRINTER

Once the printer has been selected command is executed with its output redirected.

If $P_SELECT is included in command, command is executed but not redirected. Instead the variable P_SELECT is set to the printer command.

To pass $P_SELECT through to ubmlp, it may need to be escaped.

<P> <h2>EXAMPLE</h2> <PRE> ubmlp ubreport stocklist ubmlp ubreport -p\”\$P_SELECT\”stocklist </PRE> (NB. ” and $ are escaped with\.)

FLAGS

FLAG ARGUMENT TYPE DESCRIPTION

ERRORS

EXAMPLE

SEE ALSO