Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!ihlpf!straka From: straka@ihlpf.UUCP Newsgroups: comp.sources.d Subject: Re: "look" utility? Message-ID: <1186@ihlpf.ATT.COM> Date: Wed, 4-Mar-87 14:00:25 EST Article-I.D.: ihlpf.1186 Posted: Wed Mar 4 14:00:25 1987 Date-Received: Fri, 6-Mar-87 07:29:35 EST References: <1916@cbdkc1.UUCP> <837@maynard.BSW.COM> <1145@ihlpf.ATT.COM> <846@maynard.BSW.COM> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 19 Summary: "look" In article <846@maynard.BSW.COM>, campbell@maynard.BSW.COM (Larry Campbell) writes: > >> 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. > >What about using fgrep? > >Or possibly grep "^string"? > What about it? look is still hundreds of times faster. Yes, I apologize. I agree; it was simply a case of being asleep at the terminal. Binary searches of large sorted data are certainly faster than any simple sequential search. Moral: Have enough caffeine in your veins before responding to postings! -- Rich Straka ihnp4!ihlpf!straka