#!/bin/sh ARGS=`echo $QUERY_STRING \ |sed -e's/^[^\=]*\=/ /' -e's/[&][^\=]*\=/ /g' \ -e's:%2B:+:g' -e's:%2F:/:g' -e's:%28:\(:g' -e's:%29:\):g' \ -e's:%25:\%:g' \ |tr '+' ' '` set -- $ARGS echo "Content-type: text/html" echo echo "" echo "" echo "Unit Conversion $ARGS " echo "" echo "" echo "

Results of Unit Conversion

" cd /tmp rm -f units.log UNITS=/usr/hl7/bin/units RESULT=`$UNITS $1 $2 $3` if [ -r units.log ] then echo "Error:" sed -e '/--/d' -e 's/^.*): //' units.log echo "" rm -f units.log else echo "

" echo "$1 $2 = $RESULT" echo "

" echo "
" HIN=`$UNITS 1 $2 $3` HER=`$UNITS 1 $3 $2` echo "

1 $2 = $HIN" echo "

1 $3 = $HER

" fi echo "" echo "" echo