Here is my guess:
(%8)(23:42)(punk)~> cat bin/serial
#!/bin/sh
if [ $# -ne 2 -o ! -c $1 ]; then
echo "`basename $0` <device> <speed>"
else
stty -F $1 $2 line 0 kill ^H min 100 time 2 brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -echo
cat $1 &
trap "kill $?" INT
while read _C
do
echo "$_C" > $1
done
fi
(%8)(23:42)(punk)~>
-syong