1 058b0118 2005-01-03 devnull .TH LOOK 1
3 058b0118 2005-01-03 devnull look \- find lines in a sorted list
4 058b0118 2005-01-03 devnull .SH SYNOPSIS
7 058b0118 2005-01-03 devnull .BI -dfnixt c
10 058b0118 2005-01-03 devnull .I string
15 058b0118 2005-01-03 devnull .SH DESCRIPTION
17 058b0118 2005-01-03 devnull consults a sorted
19 058b0118 2005-01-03 devnull and prints all lines that begin with
20 058b0118 2005-01-03 devnull .IR string .
21 058b0118 2005-01-03 devnull It uses binary search.
23 058b0118 2005-01-03 devnull The following options are recognized.
26 058b0118 2005-01-03 devnull affect comparisons as in
27 058b0118 2005-01-03 devnull .IR sort (1).
30 058b0118 2005-01-03 devnull Interactive.
31 058b0118 2005-01-03 devnull There is no
32 058b0118 2005-01-03 devnull .I string
33 058b0118 2005-01-03 devnull argument; instead
35 058b0118 2005-01-03 devnull takes lines from the standard input as strings to be looked up.
39 058b0118 2005-01-03 devnull Print only lines of the file whose key matches
40 058b0118 2005-01-03 devnull .I string
44 058b0118 2005-01-03 devnull `Directory' order:
45 058b0118 2005-01-03 devnull only letters, digits,
46 058b0118 2005-01-03 devnull tabs and blanks participate in comparisons.
50 058b0118 2005-01-03 devnull Upper case letters compare equal to lower case.
53 058b0118 2005-01-03 devnull Numeric comparison with initial string of digits, optional minus sign,
54 058b0118 2005-01-03 devnull and optional decimal point.
56 058b0118 2005-01-03 devnull .BR -t [ \f2c\f1 ]
57 058b0118 2005-01-03 devnull Character
59 058b0118 2005-01-03 devnull terminates the sort key in the
60 058b0118 2005-01-03 devnull .IR file .
61 058b0118 2005-01-03 devnull By default, tab terminates the key. If
63 058b0118 2005-01-03 devnull is missing the entire line comprises the key.
67 058b0118 2005-01-03 devnull is specified,
68 058b0118 2005-01-03 devnull .B /lib/words
69 058b0118 2005-01-03 devnull is assumed, with collating sequence
71 058b0118 2005-01-03 devnull .SH FILES
72 058b0118 2005-01-03 devnull .B /lib/words
73 058b0118 2005-01-03 devnull .SH SOURCE
74 c3674de4 2005-01-11 devnull .B \*9/src/cmd/look.c
75 058b0118 2005-01-03 devnull .SH "SEE ALSO"
76 058b0118 2005-01-03 devnull .IR sort (1),
77 058b0118 2005-01-03 devnull .IR grep (1)
78 058b0118 2005-01-03 devnull .SH DIAGNOSTICS
79 058b0118 2005-01-03 devnull The exit status is
80 c8b6342d 2005-01-13 devnull .RB `` "not found" ''
81 058b0118 2005-01-03 devnull if no match is found, and
82 c8b6342d 2005-01-13 devnull .RB `` "no dictionary" ''
85 058b0118 2005-01-03 devnull or the default dictionary cannot be opened.