#!/bin/sh echo "Content-type: text/html" echo echo " Fortune Cookie " oIFS=$IFS IFS="&" echo $QUERY_STRING|sed s/"%2F"/"\/"/g |sed s/"\%23"/"#"/g> /tmp/cookie.$$ . /tmp/cookie.$$ rm /tmp/cookie.$$ IFS=$oIFS cat - << EOFHTML

Fortune Cookie


EOFHTML


PARM=" "
echo -n "Reading "

if [ "$cookiels" = "long" ]
then
  PARM="-l" 
  echo -n "long "
  ckls=">"
fi

if [ "$cookiels" = "short" ]
then
  PARM="-s" 
  echo -n "short "
  ckls="<"
fi

if [ "$cookiels" = "both" ]
then
  echo -n "all "
fi

  if [ "$cookiels" != "both" ]
  then
    PARM="-n ${cookielength} ${PARM}"
    echo -n "(${ckls} ${cookielength} character) "
  fi

if [ -n "${usegivenfile}" ]
then
  PARM="${givenfile} ${PARM}"
  echo -n "cookies from ${givenfile} ..."
else
  PARM="${cookiedirectory} ${PARM}"
  #echo -n "all cookies in ${cookiedirectory} ..."
  echo -n "cookies..."
fi
echo
echo "$ /usr/games/fortune $PARM"
echo "



" /usr/games/fortune ${PARM} echo "
" cat -- << EOFHTML



Choose new settings for cookie EOFHTML