[comp.sources.wanted] "look" utility?

daleske@cbdkc1.UUCP (02/19/87)

Ok.  I've looked through all of the various places I could try.  A patch
came through for ispell which implements "L", a lookup option.  Based
on some ifdefs it would use "look" or "egrep", both which use a dictionary
in /usr/dict.  The dictionary could be called "words" or "web2".

What package does "look" come in?  Is it public domain or part of some
product?  How does it function?

Thanks for any help!  I'll post a summary of responses.

___________________________________________________________________________
John Daleske  Columbus, Ohio.  614-860-4335 | Default disclaimer...
UUCP: {ihnp4,cbosgd,desoto}!cbdkc1!daleske  |
____________________________________________|______________________________
"Now," said the butterfly, "look closer and tell me what you see."
"I see a tiny horse with wings upon its back" said Flutterby. "Why that's
 me I see!  But what am I?"
"You are you. Just as I am me!" said the wise old butterfly.  "Nothing more,
 nothing less."

campbell@maynard.UUCP (02/23/87)

In article <1916@cbdkc1.UUCP> daleske@cbdkc1.UUCP ( John Daleske x4335 3S324W FRAN) writes:
>
>What package does "look" come in?  Is it public domain or part of some
>product?  How does it function?

"look" (like "dbm") comes with V7-derived UNIX systems, which includes
Berkeley UNIX and derivatives (i.e., Ultrix).  It's seems to be missing
from System V, so I presume it's yet another utility AT&T forgot to
include in System V.

An excerpt from the man page follows:

SYNOPSIS
    look [-df] string [ file ]

DESCRIPTION
    look consults a sorted file and prints all lines that begin with string.
    It uses binary search.

Note that look searches for a literal string, not a regular expression.
You could use grep, but for a sizable file look can be hundreds of times
faster.
-- 
Larry Campbell                                The Boston Software Works, Inc.
Internet: campbell@maynard.uucp             120 Fulton Street, Boston MA 02109
uucp: {alliant,wjh12}!maynard!campbell              +1 617 367 6846
ARPA: campbell%maynard.uucp@harvisr.harvard.edu      MCI: LCAMPBELL