#!/usr/local/bin/bash DEBUG= PATH=/usr/local/bin:/usr/bin:/usr/ucb #http get or post if [ ! "$QUERY_STRING" ] ; then read QUERY_STRING fi echo "Content-type: text/html" echo "" echo "" if [ "`echo $QUERY_STRING | grep 'choose='`" ] ; then chose=`echo $QUERY_STRING | awk -F= '{ print $2 }'` year=`echo $chose | sed s/....$//` else echo "bad data" exit 1 fi if [ "$DEBUG" ] ; then echo "QUERY_STRING: $QUERY_STRING
" echo "chose: $chose
" echo "year: $year" fi echo "

Pictures from $chose

" echo 'click on the desired picture to enlarge it


' n=1 for eachfile in ~/jeremy/images/$year/$chose/*.jpg ; do file=`echo $eachfile | sed s#.*/##g` echo '' echo 'click me' if [ 7 -lt $n ] ; then echo "
" n=0 fi n=$(($n+1)) done echo '

click here to go back
' echo ""