Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ihnp4!ptsfa!lll-lcc!styx!ames!cit-vax!ll-xn!mit-eddie!husc6!wjh12!maynard!campbell From: campbell@maynard.UUCP Newsgroups: comp.sources.d Subject: Re: "look" utility? Message-ID: <846@maynard.BSW.COM> Date: Thu, 26-Feb-87 20:40:53 EST Article-I.D.: maynard.846 Posted: Thu Feb 26 20:40:53 1987 Date-Received: Sun, 1-Mar-87 07:39:58 EST References: <1916@cbdkc1.UUCP> <837@maynard.BSW.COM> <1145@ihlpf.ATT.COM> Reply-To: campbell@maynard.UUCP (Larry Campbell) Organization: The Boston Software Works, Inc. Lines: 16 In article <1145@ihlpf.ATT.COM> straka@ihlpf.ATT.COM (Straka) writes: >> 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. > >What about using fgrep? >Or possibly grep "^string"? What about it? look is still 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