32
32
.\" @(#)look.1 8.1 (Berkeley) 6/14/93
39
.Nd display lines beginning with a given string
34
.TH LOOK 1 "June 2011" "util-linux" "User Commands"
36
look \- display lines beginning with a given string
39
.RI [ options ] " string " [ file ]
49
43
utility displays any lines in
56
49
performs a binary search, the lines in
60
got the same options \-d and/or \-f that
51
must be sorted (where sort(1) got the same options
52
.BR "\-d " and/or " \-f " that
66
58
is not specified, the file
67
.Pa /usr/share/dict/words
59
.I /usr/share/dict/words
68
60
is used, only alphanumeric characters are compared and the case of
69
61
alphabetic characters is ignored.
74
Dictionary character set and order, i.e. only alphanumeric characters
75
are compared. (On by default if no file specified).
77
Ignore the case of alphabetic characters. (On by default if no file specified).
79
Use the alternate dictionary
80
.Pa /usr/share/dict/web2
64
.BR \-a , " \-\-alternative"
65
Use the alternative dictionary file.
67
.BR \-d , " \-\-alphanum"
68
Use normal dictionary character set and order, i.e. only alphanumeric characters
69
are compared. (This is on by default if no file is specified.)
71
.BR \-f , " \-\-ignore\-case"
72
Ignore the case of alphabetic characters. (This is on by default if no file is
75
.BR \-t , " \-\-terminate " \fIcharacter\fR
82
76
Specify a string termination character, i.e. only the characters
85
up to and including the first occurrence of
77
in \fIstring\fR up to and including the first occurrence of \fIcharacter\fR
81
Display help text and exit.
83
.BR \-V , " \-\-version"
84
Output version information and exit.
92
utility exits 0 if one or more lines were found and displayed,
93
1 if no lines were found, and >1 if an error occurred.
95
.Bl -tag -width /usr/share/dict/words -compact
96
.It Pa /usr/share/dict/words
88
utility exits 0 if one or more lines were found and displayed, 1 if
89
no lines were found, and >1 if an error occurred.
93
sort -d /etc/passwd -o /tmp/look.dict
94
look -t: root:foobar /tmp/look.dict
99
.IP "\fB/usr/share/dict/words\fR" 4
98
.It Pa /usr/share/dict/web2
99
the alternate dictionary
101
.IP "\fB/usr/share/dict/web2\fR" 4
102
the alternative dictionary
105
107
The original manual page stated that tabs and blank characters participated
106
in comparisons when the
108
option was specified.
109
This was incorrect and the current man page matches the historic
113
appeared in Version 7 AT&T Unix.
108
in comparisons when the alphanum option was specified. This was incorrect,
109
and the current man page matches the historic implementation.
113
utility appeared in Version 7 AT&T Unix.
115
115
The look command is part of the util-linux package and is available from
116
116
ftp://ftp.kernel.org/pub/linux/utils/util-linux/.