#!/bin/sh

echo "Content-type: text/plain"
echo
echo "CGI test script"
echo 
read input junk
echo
echo $input
echo
input=`echo $input |sed 's/&/ /g'`
echo $input
echo
for i in $input; do
j=`echo $i|sed 's/=.*//'`
if [ $j = "polar" ];then
POLAR=`echo $i|sed 's/.....=//'`
elif [ $j = "split2" ];then
SPLIT2=`echo $i|sed 's/......=//'`
elif [ $j = "split3" ];then
SPLIT3=`echo $i|sed 's/......=//'`
fi
done
cat - > inputfiles/basisopts << EOF 
 \$BASIS POLAR=$POLAR SPLIT2=$SPLIT2 SPLIT3=$SPLIT3 \$END
EOF
chmod 0666 inputfiles/ctrlopts
echo `hostname`
echo
