-->

Previous | Table of Contents | Next

Page 298

If file is not specified, the file /usr/dict/words is used, only alphanumeric characters are compared, and the case of alphabetic characters is ignored.

OPTIONS

_d Dictionary character set and order; that is, only alphanumeric characters are compared.
_f Ignore the case of alphabetic characters.
-a Use the alternate dictionary /usr/dict/web2.
_t Specify a string termination character; that is, only the characters in string up to and including the first occurrence of termchar are compared.

The look utility exits 0 if one or more lines were found and displayed, 1 if no lines were found, and >1 if an error occurred.

FILES

/usr/dict/words The dictionary
/usr/dict/web2 The alternate dictionary

SEE ALSO

grep(1), sort(1)

Compatibility

The original manual page stated that tabs and blank characters participated in comparisons when the -d option was specified. This was incorrect and the current man page matches the historic implementation.

HISTORY

look appeared in version 7 AT&T UNIX.

14 June 1993

lpq

lpq—Spool queue examination program

SYNOPSIS

lpq [-l] [-P printer] [job # ...] [user ...]

DESCRIPTION

lpq examines the spooling area used by lpd(8) for printing FILES on the line printer, and reports the status of the specified jobs or all jobs associated with a user. lpq invoked without any arguments reports on any jobs currently in the queue.

OPTIONS

-P Specify a particular printer; otherwise the default line printer is used (or the value of the PRINTER variable in the ENVIRONMENT). All other arguments supplied are interpreted as usernames or job numbers to filter out only those jobs of interest.
-l Information about each of the FILES comprising the job entry is printed. Normally, only as much information as will fit on one line is displayed.

For each job submitted—in other words, each time lpr(1) is invoked—lpq reports the user's name, current rank in the queue, the names of FILES comprising the job, the job identifier (a number that may be supplied to lprm(1) for removing a specific job), and the total size in bytes. Job ordering is dependent on the algorithm used to scan the spooling directory and is supposed to be FIFO (First in First Out). Filenames comprising a job may be unavailable (when lpr(1) is used as a sink in a pipeline) in which case the file is indicated as (standard input).

Page 299

If lpq warns that there is no daemon present (due to some malfunction, for example), the lpc(8) command can be used to restart the printer daemon.

ENVIRONMENT

If the following ENVIRONMENT variable exists, it is used by lpq:

PRINTER Specifies an alternate default printer

FILES

/etc/printcap To determine printer characteristics
/var/spool/* The spooling directory, as determined from printcap
/var/spool/*/cf* Control FILES specifying jobs
Pa/var/spool/*/lock The lock file to obtain the currently active job
/usr/share/misc/termcap For manipulating the screen for repeated display

SEE ALSO

lpr(1), lprm(1), lpc(8), lpd(8)

HISTORY

lpq appeared in BSD 3.

BUGS

Due to the dynamic nature of the information in the spooling directory, lpq may report unreliably. Output formatting is sensitive to the line length of the terminal; this can result in widely spaced columns.

DIAGNOSTICS

Unable to open various FILES. The lock file is malformed. Garbage FILES when there is no daemon active, but FILES in the spooling directory.

BSD 4.2, 9 May 1991

lpr

lpr—Offline print

SYNOPSIS

lpr [-P printer] [-# num] [-C class] [-J job] [-T title] [-U user]

[-i [numcols]] [-1234 font] [-w num] [-cdfghlnmprstv] [name ...]

DESCRIPTION

lpr uses a spooling daemon to print the named FILES when facilities become available. If no names appear, the standard input is assumed.

The following single-letter OPTIONS are used to notify the line printer spooler that the FILES are not standard text FILES. The spooling daemon will use the appropriate filters to print the data accordingly.

_c The FILES are assumed to contain data produced by cifplot(1).
_d The FILES are assumed to contain data from TeX (DVI format from Stanford).
_f Use a filter that interprets the first character of each line as a standard FORTRAN carriage control character.
_g The FILES are assumed to contain standard plot data as produced by the plot routines. (SEE ALSO plot for the filters used by the printer spooler.)

Page 300

_l Use a filter that allows control characters to be printed and suppresses page breaks.
_n The FILES are assumed to contain data from ditroff (device independent troff).
_p Use pr(1) to format the FILES (equivalent to print).
_t The FILES are assumed to contain data from troff(1) (cat phototypesetter commands).
_v The FILES are assumed to contain a raster image for devices like the Benson Varian.

These OPTIONS apply to the handling of the print job:

_P Force output to a specific printer. Normally, the default printer is used (site-dependent), or the value of the ENVIRONMENT variable PRINTER is used.
_h Suppress the printing of the burst page.
_m Send mail upon completion.
_r Remove the file upon completion of spooling or upon completion of printing (with the -s option).
_s Use symbolic links. Usually, FILES are copied to the spool directory. The -s option will use symlink(2) to link data FILES rather than trying to copy them so large FILES can be printed. This means the FILES should not be modified or removed until they have been printed.

The remaining OPTIONS apply to copies, the page display, and headers:

-# num The quantity num is the number of copies desired of each file named. For example,
     lpr _#3 foo.c bar.c more.c

would result in three copies of the file foo.c, followed by three copies of the file bar.c, and so on. On the other hand,
     cat foo.c bar.c more.c | lpr _#3

will give three copies of the concatenation of the FILES. Often a site will disable this feature to encourage use of a photocopier instead.
1234 font Specifies a font to be mounted on font position i. The daemon will construct a .railmag file referencing the font pathname.
-C Ar class Job classification to use on the burst page. For example
lpr _C EECS foo.c

causes the system name—the name returned by hostname(1)—to be replaced on the burst page by EECS, and the file foo.c to be printed.
-J Ar job Job name to print on the burst page. Normally, the first file's name is used.
-T Ar title Title name for pr(1), instead of the filename.
-U user Username to print on the burst page, also for accounting purposes. This option is only honored if the real user ID is daemon (or that specified in the printcap file instead of daemon), and is intended for those instances where print filters wish to requeue jobs.
-i numcols The output is indented. If the next argument is numeric numcols, it is used as the number of blanks to be printed before each line; otherwise, eight characters are printed.
-w Ns Ar num Uses num as the page width for pr(1).

ENVIRONMENT

If the following ENVIRONMENT variable exists, it is used by lpr:

PRINTER Specifies an alternate default printer

FILES

etc/passwd Personal identification.
/etc/printcap Printer capabilities database.
/usr/sbin/lpd* Line printer daemons.
/var/spool/output/* Directories used for spooling.

Previous | Table of Contents | Next