#!/bin/sh relfile=`echo "$QUERY_STRING"|cut -d'&' -f1` size=`echo "$QUERY_STRING"|cut -d'&' -f2|cut -d'=' -f2` file=/home/tomo/pub/pages/`dirname "$relfile"`/"$size"/`basename "$relfile"` if [ -f $file ] then echo "Content-Type: `file -b --mime $file`" echo "Content-Length: `ls -l $file | cut -d' ' -f6`" echo cat "$file" # echo Content-Type: text/plain # echo # echo "$file" else xemacs -q -batch -l www-page.elc -f www-page-batch-get "$QUERY_STRING" # xemacs -q -batch -l www-img.elc -f www-page-batch-get "$QUERY_STRING" fi