#!/bin/bash
for i in `ls *.jpg`
do
convert $i -geometry 25% ./icons/icon_$i
done
#!/bin/bash
tablewidth=4
cat << EOT
<html>
<head>
<title>Photo Album</title>
</head>
<body>
<table border=0>
<tr>
EOT
counter=0
for i in `ls *.jpg`
do
if [ $counter -eq $tablewidth ]
then
echo '</tr><tr>'
counter=0
fi
echo "<td><a href=$i><img src=icons/icon_$i></a></td>"
counter=`expr $counter + 1`
done
cat << EOT
</tr>
</table>
</body>
</html>
EOT