Pegasus InfoCorp: Web site design and web software development company

LOOK (1)

look

display lines beginning with a given string

SYNOPSIS

    look Fl dfa Fl t Ar termchar string Ar file

DESCRIPTION

    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 got the same options -d and/or -f that look is invoked with).

    If file is not specified, the file /usr/dict/words is used, only alphanumeric characters are compared and the case of alphabetic characters is ignored.

    Options: -tag -width Ds

    Fl d Dictionary character set and order, i.e. only alphanumeric characters are compared.

    Fl f Ignore the case of alphabetic characters.

    Fl a Use the alternate dictionary /usr/dict/web2

    Fl t Specify a string termination character, i.e. only the characters in string up to and including the first occurrence of termchar are compared.

    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.

FILES

    -tag -width /usr/dict/words -compact

    Pa /usr/dict/words the dictionary

    Pa /usr/dict/web2 the alternate dictionary

SEE ALSO

COMPATIBILITY

    The original manual page stated that tabs and blank characters participated in comparisons when the d option was specified. This was incorrect and the current man page matches the historic implementation.

HISTORY

    Look appeared in Version 7 AT&T Unix. \"-*- nroff -*- Copyright (C) 1989-1995 Free Software Foundation, Inc.

    Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

    Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

    Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be included in translations approved by the Free Software Foundation instead of in the original English.