There would be many ways to do this, but the first script that came to mind was:
Code:
#!/bin/sh
#
# Script to trigger an alarm past a certain temperature
# Alert temp
ALARM="80"
# Get just the temperature value
TEMP=`head -1 /dev/ttyS0 | awk '{print $3}' | cut -c2-3`
# Compare to trigger temperature
if [ "$TEMP" -ge "$ALARM" ]; then
# Put command to run here
echo "Temperature alarm!"
fi
That was off the top of my head, so there might be some syntax issues there. But I am pretty sure that will do what you want.