1 //po4a: entry man manual
3 Copyright (c) 1990, 1993
4 The Regents of the University of California. All rights reserved.
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
9 1. Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11 2. Redistributions in binary form must reproduce the above copyright
12 notice, this list of conditions and the following disclaimer in the
13 documentation and/or other materials provided with the distribution.
14 3. All advertising materials mentioning features or use of this software
15 must display the following acknowledgement:
16 This product includes software developed by the University of
17 California, Berkeley and its contributors.
18 4. Neither the name of the University nor the names of its contributors
19 may be used to endorse or promote products derived from this software
20 without specific prior written permission.
22 THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 @(#)look.1 8.1 (Berkeley) 6/14/93
38 :man manual: User Commands
39 :man source: util-linux {release-version}
45 look - display lines beginning with a given string
49 *look* [options] _string_ [_file_]
53 The *look* utility displays any lines in _file_ which contain _string_ as a prefix. As *look* performs a binary search, the lines in _file_ must be sorted (where *sort*(1) was given the same options *-d* and/or *-f* that *look* is invoked with).
55 If _file_ is not specified, the file _/usr/share/dict/words_ is used, only alphanumeric characters are compared and the case of alphabetic characters is ignored.
59 *-a*, *--alternative*::
60 Use the alternative dictionary file.
63 Use normal dictionary character set and order, i.e., only blanks and alphanumeric characters are compared. This is on by default if no file is specified.
65 Note that blanks have been added to dictionary character set for compatibility with *sort -d* command since version 2.28.
67 *-f*, *--ignore-case*::
68 Ignore the case of alphabetic characters. This is on by default if no file is specified.
70 *-t*, *--terminate* _character_::
71 Specify a string termination character, i.e., only the characters in _string_ up to and including the first occurrence of _character_ are compared.
73 include::man-common/help-version.adoc[]
75 The *look* utility exits 0 if one or more lines were found and displayed, 1 if no lines were found, and >1 if an error occurred.
80 Path to a dictionary file. The environment variable has greater priority than the dictionary path defined in the *FILES* segment.
84 _/usr/share/dict/words_::
87 _/usr/share/dict/web2_::
88 the alternative dictionary
92 The *look* utility appeared in Version 7 AT&T Unix.
97 sort -d /etc/passwd -o /tmp/look.dict
98 look -t: root:foobar /tmp/look.dict
106 include::man-common/bugreports.adoc[]
108 include::man-common/footer.adoc[]
111 include::man-common/translation.adoc[]