#!/bin/bash

IPADDRESS=192.168.78.50
CAMERAMODECTLOC=bay4hfs
TMPFILE=bay4tmp
TELNETSERVER=127.0.0.1
PORT=6802
MONITORNUMBER=12


wget $IPADDRESS -O $CAMERAMODECTLOC && cat $CAMERAMODECTLOC | grep Temp > $TMPFILE

RESULT=$(cat $TMPFILE)

telnet $TELNETSERVER $PORT <<EOF
$MONITORNUMBER|show||||$RESULT
EOF

