|
|
1.1 root 1: .TH LOOK 1
2: .CT 1 files
3: .SH NAME
4: look \(mi find lines in a sorted list
5: .SH SYNOPSIS
6: .B look
7: [
8: .BI -dfnixt c
9: ]
10: [
11: .I string
12: ]
13: [
14: .I file
15: ]
16: .SH DESCRIPTION
17: .I Look
18: consults a sorted
19: .I file
20: and prints all lines that begin with
21: .IR string .
22: It uses binary search.
23: .PP
24: The following options are recognized.
25: Options
26: .BI dfnt c
27: affect comparisons as in
28: .IR sort (1).
29: .TP
30: .B -i
31: Interactive.
32: There is no
33: .I string
34: argument; instead
35: .I look
36: takes lines from the standard input as strings to be looked up.
37: .TP
38: .B -x
39: Exact.
40: Print only lines of the file whose key matches
41: .I string
42: exactly.
43: .TP
44: .B -d
45: `Directory' order:
46: only letters, digits,
47: tabs and blanks participate in comparisons.
48: .TP
49: .B -f
50: Fold.
51: Upper case letters compare equal to lower case.
52: .TP
53: .B -n
54: Numeric comparison with initial string of digits, optional minus sign,
55: and optional decimal point.
56: .TP
57: .BI -t c
58: `Tab character'
59: .I c
60: terminates the sort key in the
61: .I file.
62: .PP
63: If no
64: .I file
65: is specified,
66: .F /usr/dict/words
67: is assumed, with collating sequence
68: .BR df .
69: .SH FILES
70: .F /usr/dict/words
71: .SH "SEE ALSO"
72: .IR sort (1),
73: .IR gre (1),
74: .IR dict (7)
75: .SH DIAGNOSTICS
76: .I Look
77: returns exit status 0 if
78: .I string
79: is found, 1 if not found, 2 for error.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.