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) got the same options -d and/or -f that look is invoked with).
15
16       If  file is not specified, the file /usr/share/dict/words is used, only
17       alphanumeric characters are compared and the case of alphabetic charac‐
18       ters is ignored.
19

OPTIONS

21       -a, --alternative
22              Use the alternative dictionary file.
23
24       -d, --alphanum
25              Use  normal  dictionary  character  set  and  order,  i.e.  only
26              alphanumeric characters are compared.  (This is on by default if
27              no file is specified.)
28
29       -f, --ignore-case
30              Ignore  the  case  of  alphabetic  characters.   (This  is on by
31              default if no file is specified.)
32
33       -t, --terminate character
34              Specify a string termination character, i.e. only the characters
35              in  string up to and including the first occurrence of character
36              are compared.
37
38       -h, --help
39              Display help text and exit.
40
41       -V, --version
42              Output version information and exit.
43
44       The look utility exits 0 if one or more lines were found and displayed,
45       1 if no lines were found, and >1 if an error occurred.
46

EXAMPLE

48              sort -d /etc/passwd -o /tmp/look.dict
49              look -t: root:foobar /tmp/look.dict
50

FILES

52       /usr/share/dict/words
53           the dictionary
54
55       /usr/share/dict/web2
56           the alternative dictionary
57

SEE ALSO

59       grep(1), sort(1)
60

COMPATIBILITY

62       The original manual page stated that tabs and blank characters partici‐
63       pated in comparisons when the alphanum option was specified.  This  was
64       incorrect,  and  the  current man page matches the historic implementa‐
65       tion.
66

HISTORY

68       The look utility appeared in Version 7 AT&T Unix.
69

AVAILABILITY

71       The look command is part of the util-linux  package  and  is  available
72       from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
73
74
75
76util-linux                         June 2011                           LOOK(1)
Impressum