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 a
13       prefix. As look performs a binary search, the lines in file must be
14       sorted (where sort(1) was given the same options -d and/or -f that look
15       is invoked 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
19       characters 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 if
28           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 if
35           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 are
40           compared.
41
42       -h, --help
43           Display help text and exit.
44
45       -V, --version
46           Print version 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 the 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

REPORTING BUGS

74       For bug reports, use the issue tracker at
75       https://github.com/util-linux/util-linux/issues.
76

AVAILABILITY

78       The look command is part of the util-linux package which can be
79       downloaded from Linux Kernel Archive
80       <https://www.kernel.org/pub/linux/utils/util-linux/>.
81
82
83
84util-linux 2.39.2                 2023-06-14                           LOOK(1)
Impressum