#!/bin/sh # Small script to list all the files in the current directory and # create a dummy html file with links to all of them. If you specify # files on the command line it will simply list all of those. if [ $# -lt 1 ]; then echo "$0: Please specify the files you wish to make into an index." exit 1 fi echo "<HTML> <HEAD> <META NAME=\"GENERATOR\" CONTENT=\"Daleken HTML Indexer\"> <TITLE>Contents of $PWD</TITLE> </HEAD> <BODY> <H1>Contents of $PWD</H1> <HR></HR> <UL>" for i in `ls ${@:-*.html *.htm} 2>/dev/null`; do echo "<LI><A HREF=\"$i\">$i</A></LI>"; done echo '</UL> <HR></HR> </BODY> </HTML>'