[BACK]Return to look.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / look

Annotation of src/usr.bin/look/look.1, Revision 1.10

1.10    ! jmc         1: .\"    $OpenBSD: look.1,v 1.9 2003/06/03 02:56:10 millert Exp $
1.1       deraadt     2: .\"    $NetBSD: look.1,v 1.3 1994/12/23 01:10:59 jtc Exp $
                      3: .\"
                      4: .\" Copyright (c) 1990, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
1.9       millert    15: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    16: .\"    may be used to endorse or promote products derived from this software
                     17: .\"    without specific prior written permission.
                     18: .\"
                     19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     22: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     29: .\" SUCH DAMAGE.
                     30: .\"
                     31: .\"     @(#)look.1     8.1 (Berkeley) 6/14/93
                     32: .\"
                     33: .Dd June 14, 1993
                     34: .Dt LOOK 1
                     35: .Os
                     36: .Sh NAME
                     37: .Nm look
                     38: .Nd display lines beginning with a given string
                     39: .Sh SYNOPSIS
                     40: .Nm look
                     41: .Op Fl df
                     42: .Op Fl t Ar termchar
                     43: .Ar string
                     44: .Op Ar file
                     45: .Sh DESCRIPTION
1.4       aaron      46: The
                     47: .Nm
1.1       deraadt    48: utility displays any lines in
                     49: .Ar file
                     50: which contain
                     51: .Ar string
                     52: as a prefix.
                     53: As
1.4       aaron      54: .Nm
1.1       deraadt    55: performs a binary search, the lines in
                     56: .Ar file
                     57: must be sorted.
                     58: .Pp
                     59: If
                     60: .Ar file
                     61: is not specified, the file
                     62: .Pa /usr/share/dict/words
1.8       aaron      63: is used.
                     64: Only alphanumeric characters are compared and the case of
1.1       deraadt    65: alphabetic characters is ignored.
                     66: .Pp
1.6       aaron      67: The options are as follows:
1.1       deraadt    68: .Bl -tag -width Ds
                     69: .It Fl d
1.8       aaron      70: Dictionary character set and order, i.e., only alphanumeric characters
1.1       deraadt    71: are compared.
                     72: .It Fl f
                     73: Ignore the case of alphabetic characters.
1.3       aaron      74: .It Fl t Ar termchar
1.8       aaron      75: Specify a string termination character, i.e., only the characters
1.1       deraadt    76: in
                     77: .Ar string
                     78: up to and including the first occurrence of
                     79: .Ar termchar
                     80: are compared.
                     81: .El
                     82: .Pp
                     83: The
1.4       aaron      84: .Nm
1.1       deraadt    85: utility exits 0 if one or more lines were found and displayed,
1.8       aaron      86: 1 if no lines were found, or >1 if an error occurred.
1.1       deraadt    87: .Sh FILES
                     88: .Bl -tag -width /usr/share/dict/words -compact
                     89: .It Pa /usr/share/dict/words
                     90: the dictionary
                     91: .El
                     92: .Sh SEE ALSO
                     93: .Xr grep 1 ,
                     94: .Xr sort 1
1.10    ! jmc        95: .Sh STANDARDS
1.1       deraadt    96: The original manual page stated that tabs and blank characters participated
                     97: in comparisons when the
                     98: .Fl d
                     99: option was specified.
                    100: This was incorrect and the current man page matches the historic
                    101: implementation.
                    102: .Sh HISTORY
1.7       aaron     103: The
1.4       aaron     104: .Nm
1.7       aaron     105: command appeared in
1.5       aaron     106: .At v7 .