]>
Commit | Line | Data |
---|---|---|
295b3979 | 1 | //po4a: entry man manual |
6c64d12d MB |
2 | //// |
3 | Copyright (c) 1990, 1993 | |
4 | The Regents of the University of California. All rights reserved. | |
5 | ||
6 | Redistribution and use in source and binary forms, with or without | |
7 | modification, are permitted provided that the following conditions | |
8 | are met: | |
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. | |
21 | ||
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 | |
32 | SUCH 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 | ||
45 | look - display lines beginning with a given string | |
46 | ||
47 | == SYNOPSIS | |
48 | ||
49 | *look* [options] _string_ [_file_] | |
50 | ||
51 | == DESCRIPTION | |
52 | ||
1a48eee7 | 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). |
6c64d12d MB |
54 | |
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. | |
56 | ||
57 | == OPTIONS | |
58 | ||
59 | *-a*, *--alternative*:: | |
2c646c80 | 60 | Use the alternative dictionary file. |
6c64d12d MB |
61 | |
62 | *-d*, *--alphanum*:: | |
2c646c80 MB |
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. |
64 | + | |
65 | Note that blanks have been added to dictionary character set for compatibility with *sort -d* command since version 2.28. | |
6c64d12d MB |
66 | |
67 | *-f*, *--ignore-case*:: | |
2c646c80 | 68 | Ignore the case of alphabetic characters. This is on by default if no file is specified. |
6c64d12d MB |
69 | |
70 | *-t*, *--terminate* _character_:: | |
2c646c80 | 71 | Specify a string termination character, i.e., only the characters in _string_ up to and including the first occurrence of _character_ are compared. |
6c64d12d MB |
72 | |
73 | *-V*, *--version*:: | |
2c646c80 | 74 | Display version information and exit. |
6c64d12d MB |
75 | |
76 | *-h*, *--help*:: | |
2c646c80 | 77 | Display help text and exit. |
6c64d12d MB |
78 | |
79 | 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 | ||
81 | == ENVIRONMENT | |
82 | ||
83 | *WORDLIST*:: | |
c83a52f0 | 84 | Path to a dictionary file. The environment variable has greater priority than the dictionary path defined in the *FILES* segment. |
6c64d12d MB |
85 | |
86 | == FILES | |
87 | ||
88 | _/usr/share/dict/words_:: | |
2c646c80 | 89 | the dictionary |
6c64d12d MB |
90 | |
91 | _/usr/share/dict/web2_:: | |
2c646c80 | 92 | the alternative dictionary |
6c64d12d MB |
93 | |
94 | == HISTORY | |
95 | ||
96 | The *look* utility appeared in Version 7 AT&T Unix. | |
97 | ||
98 | == EXAMPLES | |
99 | ||
100 | .... | |
101 | sort -d /etc/passwd -o /tmp/look.dict | |
102 | look -t: root:foobar /tmp/look.dict | |
103 | .... | |
104 | ||
105 | == SEE ALSO | |
106 | ||
107 | *grep*(1), | |
108 | *sort*(1) | |
109 | ||
625e9c61 | 110 | include::man-common/bugreports.adoc[] |
6c64d12d | 111 | |
625e9c61 | 112 | include::man-common/footer.adoc[] |
6c64d12d MB |
113 | |
114 | ifdef::translation[] | |
625e9c61 | 115 | include::man-common/translation.adoc[] |
6c64d12d | 116 | endif::[] |