[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.2

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