#!/bin/ksh FAQHOME=/ftp/pub/sdf/faq FIRST=`echo $*|cut -d\? -f2` SECOND=`echo $*|cut -d\? -f3` case $FIRST$SECOND in *..*|*/*) FIRST="" ;; esac echo "
" echo "" if [ "$FIRST" = "" ] || [ "$FIRST" = "faq" ] then if [ -d $FAQHOME ] then for i in `ls $FAQHOME|grep -v gophermap` do FAQ=$i DESC=`head -1 $FAQHOME/$i/.desc` echo "" echo "" done fi echo "
$FAQ$DESC
" else if [ "$SECOND" = "" ] then if [ -d $FAQHOME/$FIRST ] then for i in `ls $FAQHOME/$FIRST|grep -v gophermap` do DESC=`head -1 $FAQHOME/$FIRST/$i|cut -c5-80` echo "$i" echo "$DESC" done echo "" echo "

[back]" fi else FIRST=`echo $FIRST|tr -d [:punct:]` if [ -f $FAQHOME/$FIRST/$SECOND ] then echo "

"
                cat $FAQHOME/$FIRST/$SECOND
                echo "
" echo "" echo "

" echo "[back]" fi fi fi