[comp.bugs.sys5] "look" utility?

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