#!/bin/sh DIR=`pwd` FN=`basename $PWD` URL_HEAD='www.漏れのティンコ.co.jp' echo "<html><head><title>$FN</title><head><body>" > index.html echo "<div align=center><font size=4>$FN</font></div>" >> index.html for i in `ls` do if [ -d $i ] ; then cd $i ls |grep "[jJ][pP][gG]"| sed 's%\(.*\)%<a href="\1" alt="\1"><im g src="\1" height=120 width=80></a>%' > index.html n=`ls | grep "[jJ][pP][gG]" | head -1` cd $DIR echo "<IMG SRC=\"$URL_HEAD/$i/$n\" HEIGHT=\"120\" WIDTH=\"80\">< a href=\"$URL_HEAD/$i/\" target=\"_blank\"><font size=1>$i</font></a>" >> index. html fi done echo "</body></html>" >> index.html