1LOOK(1) BSD General Commands Manual LOOK(1)
2
4 look — display lines beginning with a given string
5
7 look [-dfa] [-t termchar] string [file]
8
10 The look utility displays any lines in file which contain string as a
11 prefix. As look performs a binary search, the lines in file must be
12 sorted (where sort(1) got the same options -d and/or -f that look is
13 invoked with).
14
15 If file is not specified, the file /usr/share/dict/words is used, only
16 alphanumeric characters are compared and the case of alphabetic charac‐
17 ters is ignored.
18
19 Options:
20
21 -d Dictionary character set and order, i.e. only alphanumeric char‐
22 acters are compared.
23
24 -f Ignore the case of alphabetic characters.
25
26 -a Use the alternate dictionary /usr/share/dict/web2
27
28 -t Specify a string termination character, i.e. only the characters
29 in string up to and including the first occurrence of termchar
30 are compared.
31
32 The look utility exits 0 if one or more lines were found and displayed, 1
33 if no lines were found, and >1 if an error occurred.
34
36 /usr/share/dict/words the dictionary
37 /usr/share/dict/web2 the alternate dictionary
38
40 grep(1), sort(1)
41
43 The original manual page stated that tabs and blank characters partici‐
44 pated in comparisons when the -d option was specified. This was incor‐
45 rect and the current man page matches the historic implementation.
46
48 Look appeared in Version 7 AT&T Unix.
49
50BSD June 14, 1993 BSD