#!/bin/bash probe_addr='28-000006799670' res=`cat /sys/bus/w1/devices/$probe_addr/w1_slave | head -n 1 | grep YES | wc -l` if [ $res -eq 1 ] then temp01=`cat /sys/bus/w1/devices/$probe_addr/w1_slave | tail -n 1 | cut -f10 -d " " | cut -f 2 -d "="` temp02=$(awk "BEGIN {printf \"%.2f\",${temp01}/1000}") echo $temp02 fi