1LOOK(1)                          User Commands                         LOOK(1)
2
3
4

NAME

6       look - display lines beginning with a given string
7

SYNOPSIS

9       look [options] string [file]
10

DESCRIPTION

12       The  look  utility displays any lines in file which contain string.  As
13       look performs a binary search, the lines in file must be sorted  (where
14       sort(1)  was  given  the same options -d and/or -f that look is invoked
15       with).
16
17       If file is not specified, the file /usr/share/dict/words is used,  only
18       alphanumeric characters are compared and the case of alphabetic charac‐
19       ters is ignored.
20

OPTIONS

22       -a, --alternative
23              Use the alternative dictionary file.
24
25       -d, --alphanum
26              Use normal dictionary character set and order, i.e., only blanks
27              and alphanumeric characters are compared.  This is on by default
28              if no file is specified.
29
30              Note that blanks have been added to dictionary character set for
31              compatibility with sort -d command since version 2.28.
32
33       -f, --ignore-case
34              Ignore the case of alphabetic characters.  This is on by default
35              if no file is specified.
36
37       -t, --terminate character
38              Specify a string termination character, i.e., only  the  charac‐
39              ters in string up to and including the first occurrence of char‐
40              acter are compared.
41
42       -V, --version
43              Display version information and exit.
44
45       -h, --help
46              Display help text and exit.
47
48       The look utility exits 0 if one or more lines were found and displayed,
49       1 if no lines were found, and >1 if an error occurred.
50

ENVIRONMENT

52       WORDLIST
53              Path to a dictionary file.  The environment variable has greater
54              priority than the dictionary path defined in FILES segment.
55

FILES

57       /usr/share/dict/words
58           the dictionary
59
60       /usr/share/dict/web2
61           the alternative dictionary
62

HISTORY

64       The look utility appeared in Version 7 AT&T Unix.
65

EXAMPLES

67              sort -d /etc/passwd -o /tmp/look.dict
68              look -t: root:foobar /tmp/look.dict
69

SEE ALSO

71       grep(1), sort(1)
72

AVAILABILITY

74       The look command is part of the util-linux  package  and  is  available
75       from https://www.kernel.org/pub/linux/utils/util-linux/.
76
77
78
79util-linux                         June 2011                           LOOK(1)
Impressum