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 characters
39              in  string up to and including the first occurrence of character
40              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

EXAMPLE

52              sort -d /etc/passwd -o /tmp/look.dict
53              look -t: root:foobar /tmp/look.dict
54

ENVIRONMENT

56       WORDLIST
57              Path to a dictionary file.  The environment variable has greater
58              priority than the dictionary path defined in FILES segment.
59

FILES

61       /usr/share/dict/words
62           the dictionary
63
64       /usr/share/dict/web2
65           the alternative dictionary
66

SEE ALSO

68       grep(1), sort(1)
69

HISTORY

71       The look utility appeared in Version 7 AT&T Unix.
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