#!/bin/sh
OUT=index.html
cat > $OUT <<...
<html>
<head>
 <title>Bilder aus Wales</title>
</head>
<body>
...

for bild in `ls p*[0-9].jpg` ; do
    thumb=`basename $bild .jpg`_thumb.jpg
    if [ ! -f $thumb ] ; then
        convert $bild -geometry 100x80 $thumb
    fi
    echo >> $OUT "<a href=\"$bild\"><img src=\"$thumb\" alt=\"$bild\"></a><br />"
done

cat >> $OUT <<...
</body>
</html>
...

