V8/usr/man/man1/look.1

Compare this file to the similar file:
Show the results in this format:

.TH LOOK 1 
.SH NAME
look \- find lines in a sorted list
.SH SYNOPSIS
.B look
[
.BI \-dfnixt c
]
[ string ]
[ file ]
.SH DESCRIPTION
.I Look
consults a sorted
.I file
and prints all lines that begin with
.IR string .
It uses binary search.
.PP
The following options are recognized.
Options
.BI dfnt c
affect comparisons as in
.IR  sort (1).
.TP
.B i
Interactive. 
There is no
.I string
argument; instead 
.I look
takes lines from the standard input as strings to be looked up.
.TP
.B x
Exact.
Print only lines of the file whose key matches
.I string 
exactly.
.TP
.B  d
`Dictionary' order:
only letters, digits,
tabs and blanks participate in comparisons.
.TP
.B  f
Fold.
Upper case letters compare equal to lower case.
.TP
.B n
Numeric comparison with initial string of digits, optional minus sign,
and optional decimal point.
.TP
.BI t c
`Tab character'
.I c
terminates the sort key in the
.I file.
.PP
If no
.I file
is specified,
.I /usr/dict/words
is assumed, with collating sequence
.BR df .
.SH FILES
/usr/dict/words
.SH "SEE ALSO"
sort(1), grep(1), dict(7)
.SH DIAGNOSTICS
.I Look
returns exit status 0 if
.I string
is found, 1 if not found, 2 for error.