#/* Copyright 1999, IBM Corporation # * All rights reserved # * # * Distribute freely, except: don't remove my name from the source or # * documentation (don't take credit for my work), mark your changes # * (don't get me blamed for your possible bugs), don't alter or # * remove this notice. No fee may be charged if you distribute the # * package (except for such things as the price of a disk or tape, # * postage, etc.). No warranty of any kind, express or implied, is # * included with this software; use at your own risk, responsibility # * for damages (if any) to anyone resulting from the use of this # * software rests entirely with the user. # * # * Send me bug reports, bug fixes, enhancements, requests, flames, # * etc. I can be reached as follows: # * # * John Pfuntner John_Pfuntner@tivoli.com # */ Introduction ============ This is the readme file for websearch Version 1.0, a korn shell script written by John Pfuntner. The repository for the distributing the tool is http://www.s390.ibm.com/ftp/os390/oe/toys/websearch.tar.Z. I originally created this script as a "quick and dirty", "do it yourself" way to perform search the OS/390 web site. You can find the original version at work at http://www1.s390.ibm.com/cgi-bin/oefind.sh. I based it on the external behavior of search tools I had used on the WWW and my knowledge of OS/390 and the korn shell. It is so ridiculously simple that you may not want to consider using it but if you don't need a lot of bells and whistles, it may suit your needs well. I imagine you're familiar with other web search engines like AltaVista, Yahoo, etc. Here are some of the advantages and disadvantages I see of this script: Advantages ========== o no database to set up, the script reads from web pages - after some very simple customization (perhaps only one line), you can be performing searches! o source code is provided so changes are possible o output is highly customizable o hard to "break" - as long as OS/390 is behaving properly Disadvantages ============= o rather slow o can find "nonsense" hits: the tool does not filter out HTML tags, comments, etc. o can't search for complete words easily: that is find "the" but not "there", "soothe", etc. o no logical expressions: find pages with "this" and/or "that" Installation & Customization ============================ You need to place this script in an HFS directory that your web server will recognize as a cgi-bin directory. That means you'll have to have write permission to a directory specified by an EXEC directive in your http configuration file. You'll want to make sure the execute bit for the script is turned on. If it isn't, try something like: chmod +x websearch.sh I would recommend permission settings of 755 (rwxr-xr-x). The script looks for all *.html files in a hierarchical tree which is rooted at a directory defined by the script variable called SEARCH_BASE. You should change this to the directory you want to search. You might also want to customize the output from the dynamic pages the scripts generate. Modify the "intro" and "outro" functions in the script to suit your tastes. Try it first with the default beginning and ending HTML. Then try modifying it to make it more "your own". You can add text, pictures, links, etc. You should know a little HTML if you want to modify these functions and if you do, you'll have a lot of control. You shouldn't need to know much about korn shell programming unless you want to do something really fancy.