how to generate an image only html file in bash

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Technomage
Date:  
To: Main PLUG discussion list
Subject: how to generate an image only html file in bash
here's what I'd like to do:
1. create individual html files for each picture (number not important)
2. have each html file display the current image with an href to the
next in order image in the directory
3. have the first html file linked from inside index.html (such that it
shows the first image)
4. when the last image in the directory is reached, that html file has
an href that refers to that current image

can I get a little help here? the bash scripting tutorials are lacking
on some points.
now, what I have is very incomplete and I am not sure how to proceed here:

****** bash script *******
#!/bin/bash
#create the index.html file with the type, header and title
touch index.html
echo "Content-type: text/html" >> index.html
echo "" >> index.html
echo "<html><head><title>picture display shell
script</title></head><body>" >> index.html

# read the directory with the picture files
for i in *.jpg
     do
# this is the part I need to fill in (vreate the individual html files 
from each listed jpg image
# write those files, then create the finished index.html that links in 
the first file.


done
# close html file body and final type tag
echo "</body><html>" >> index.html
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss