Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!decvax!ima!cfisun!lakart!dg From: dg@lakart.UUCP (David Goodenough) Newsgroups: comp.sources.wanted Subject: subroutine to do the same as look(1) Message-ID: <529@lakart.UUCP> Date: 2 May 89 20:42:14 GMT Reply-To: dg@lakart.UUCP (David Goodenough) Organization: Lakart Corporation - The ultimate in broadcast automation Lines: 14 I am looking for a subroutine that does the same as the program look: I want to give it a FILE pointer, an array, and a search string, and it looks through the file attached to the FILE pointer for a line that starts with the given string; it can assume that the file is sorted. I'm not too worried about duplicate entries, it can be assumed that the string given will uniquely identify the line, if such a line exists. Any suggestions, source, ideas would be most welcome. -- dg@lakart.UUCP - David Goodenough +---+ IHS | +-+-+ ....... !harvard!xait!lakart!dg +-+-+ | AKA: dg%lakart.uucp@xait.xerox.com +---+