5747018 [rkeene@sledge /home/rkeene/projects/scripts]$ cat -n mkindex.sh
 1 #!/bin/sh
 2 
 3 echo '<html>' > index.html
 4 echo -n '<head><title>' >> index.html
 5 echo -n $* >> index.html
 6 echo '</title></head>' >> index.html
 7 echo '<body bgcolor="#ffffff" text="#000000">' >> index.html
 8 for i in *; do
 9         if [ "${i}" = "index.html" ]; then continue; fi
10     MD5=`md5sum ${i} | awk '{print $1}'`
11     SIZE=`du -h ${i} | awk '{print $1}'`
12         echo "<a href=\"${i}\">${i}</a>'s (${SIZE}Bytes) MD5 is ${MD5}<br>" >> index.html
13 done
14 echo '</body></html>' >> index.html

mkindex.sh is a small script to generate an index for a directory.
5747019 [rkeene@sledge /home/rkeene/projects/scripts]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2004-01-15 03:20:01