1LOOK(1)                   BSD General Commands Manual                  LOOK(1)
2

NAME

4     look — display lines beginning with a given string
5

SYNOPSIS

7     look [-dfa] [-t termchar] string [file]
8

DESCRIPTION

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. (On by default if no file specified).
23
24     -f      Ignore the case of alphabetic characters. (On by default if no
25             file specified).
26
27     -a      Use the alternate dictionary /usr/share/dict/web2
28
29     -t      Specify a string termination character, i.e. only the characters
30             in string up to and including the first occurrence of termchar
31             are compared.
32
33     The look utility exits 0 if one or more lines were found and displayed, 1
34     if no lines were found, and >1 if an error occurred.
35

FILES

37     /usr/share/dict/words  the dictionary
38     /usr/share/dict/web2   the alternate dictionary
39

SEE ALSO

41     grep(1), sort(1)
42

COMPATIBILITY

44     The original manual page stated that tabs and blank characters partici‐
45     pated in comparisons when the -d option was specified.  This was incor‐
46     rect and the current man page matches the historic implementation.
47

HISTORY

49     Look appeared in Version 7 AT&T Unix.
50

AVAILABILITY

52     The look command is part of the util-linux-ng package and is available
53     from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
54
55BSD                              June 14, 1993                             BSD
Impressum