start page | rating of books | rating of authors | reviews | copyrights

Unix Power ToolsUnix Power ToolsSearch this book

13.14. Fast Searches and Spelling Checks with "look"

Every so often, someone has designed a new, faster grep-type program. Public- domain software archives have more than a few of them. One of the fastest search programs has been around for years: look. It uses a binary search method that's very fast. But look won't solve all your problems: it works only on files that have been sorted (Section 22.1). If you have a big file or database that can be sorted, searching it with look will save a lot of time. For example, to search for all lines that start with Alpha:

% look Alpha filename
Alpha particle
Alphanumeric

Figure Go to http://examples.oreilly.com/upt3 for more information on: look

The look program can also be used to check the spelling of a word or find a related word; see Section 16.3. If you don't have look installed on your system, you can get it from the Unix Power Tools web site.

-- JP



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.