Re: Searching a file.

[email protected]
Wed, 9 Mar 1994 17:32:58 --100


> How do I implement a simple search ?
>

> The server holds a large file of the LISTSERV mailing lists, with one
> mailing list per line. I want to:
>

> - ask the user for a keyword
> - extract from the file all lines containing this keyword
> - present the results to the user.
This is fairly easy. Take a look at the examples in the cgi-bin directory,
especially the "cal" command. Copy it to a file like "keysearch" and modify
it in such a way that it does a "grep" on the listing file and returns
the result embedded in <PRE> </PRE>.
Now you can do keyword searches by accessing "/htbin/keysearch".
You can also create a forms interface which makes it easier for users to
use your keyword searching mechanism.

For more complicated search tasks, I recommend our public domain ICE
search extension package. I will soon release a new version which is
CGI compliant (sorry Rob and Ari.. you were right. It needs to have
a cgi-bin interface, not a server hack).

Contact me by email if you need further help - but please wait until next
week, since I am extremely busy preparing for the german CeBit computer fair.

Cheerio,
Chris

---
"I ride a tandem with the random.." 

Christian Neuss # Fraunhofer Institute for Computer Graphics Wilhelminenstr.7 # 64283 Darmstadt # Germany e-mail: [email protected] finger: [email protected]