]> git.ipfire.org Git - thirdparty/util-linux.git/blame_incremental - misc-utils/look.1.adoc
Merge branch 'PR/libmount-utab-event' of github.com:karelzak/util-linux-work
[thirdparty/util-linux.git] / misc-utils / look.1.adoc
... / ...
CommitLineData
1//po4a: entry man manual
2////
3Copyright (c) 1990, 1993
4 The Regents of the University of California. All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions
8are met:
91. Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
112. 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.
143. 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.
184. 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.
21
22THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32SUCH DAMAGE.
33
34 @(#)look.1 8.1 (Berkeley) 6/14/93
35////
36= look(1)
37:doctype: manpage
38:man manual: User Commands
39:man source: util-linux {release-version}
40:page-layout: base
41:command: look
42
43== NAME
44
45look - display lines beginning with a given string
46
47== SYNOPSIS
48
49*look* [options] _string_ [_file_]
50
51== DESCRIPTION
52
53The *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).
54
55If _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.
56
57== OPTIONS
58
59*-a*, *--alternative*::
60Use the alternative dictionary file.
61
62*-d*, *--alphanum*::
63Use 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.
64+
65Note that blanks have been added to dictionary character set for compatibility with *sort -d* command since version 2.28.
66
67*-f*, *--ignore-case*::
68Ignore the case of alphabetic characters. This is on by default if no file is specified.
69
70*-t*, *--terminate* _character_::
71Specify a string termination character, i.e., only the characters in _string_ up to and including the first occurrence of _character_ are compared.
72
73include::man-common/help-version.adoc[]
74
75The *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.
76
77== ENVIRONMENT
78
79*WORDLIST*::
80Path to a dictionary file. The environment variable has greater priority than the dictionary path defined in the *FILES* segment.
81
82== FILES
83
84_/usr/share/dict/words_::
85the dictionary
86
87_/usr/share/dict/web2_::
88the alternative dictionary
89
90== HISTORY
91
92The *look* utility appeared in Version 7 AT&T Unix.
93
94== EXAMPLES
95
96....
97sort -d /etc/passwd -o /tmp/look.dict
98look -t: root:foobar /tmp/look.dict
99....
100
101== SEE ALSO
102
103*grep*(1),
104*sort*(1)
105
106include::man-common/bugreports.adoc[]
107
108include::man-common/footer.adoc[]
109
110ifdef::translation[]
111include::man-common/translation.adoc[]
112endif::[]