Na koniec dzialajacy tak jak nalezy jeden skrypt. Moze komus kiedys sie przyda pomimo tego, ze na tym forum w roznych miejscach ma niezbedne informacje.
root@Gargoyle:~$ cat /usr/sbin/templot.sh
#!/bin/sh
echo `digitemp_DS9097U -a -q -o "%Y-%m-%d %H:%M:%S %.2C"` >> /usr/meteo/temperatura.txt
AKT=$(cut -d' ' -f6 /usr/meteo/temperatura.txt | tail -1)
MIN=$(cut -d' ' -f6 /usr/meteo/temperatura.txt | sort -n | head -1)
MAX=$(cut -d' ' -f6 /usr/meteo/temperatura.txt | sort -n | tail -1)
GNUPLOT_COMMAND="/tmp/gnuplot_cmd"
touch ${GNUPLOT_COMMAND}
cat > ${GNUPLOT_COMMAND} << __EOF__
set terminal png small size 800,500
set output '/www/temp.png'
set title "Wykres temperatury"
set xlabel "godzina"
set timefmt "%Y-%m-%d %H:%M:%S"
set xdata time
set ylabel "temperatura °C"
set format x "%H"
set grid
set key left
set style line 1 linecolor rgbcolor "#0000AA
set key spacing 1.3
set label "aktualna: ${AKT}" at graph 0.4, graph 0.97
set label "minimalna: ${MIN}" at graph 0.4, graph 0.92
set label "maksymalna: ${MAX}" at graph 0.4, graph 0.87
plot '/usr/meteo/temperatura.txt' using 4:6 t 'zewnętrzny' with lines lt 1, \
'/usr/meteo/temperatura.txt' using 10:12 t 'parapet' with lines lw 1, \
'/usr/meteo/temperatura.txt' using 1:3 t 'ziemia' with lines lw 1, \
'/usr/meteo/temperatura.txt' using 7:9 t 'luzny' with lines lw 1, \
'/usr/meteo/temperatura.txt' using 4:6 smooth bezier t 'dane usrednione' with lines lt 1
quit
__EOF__
gnuplot ${GNUPLOT_COMMAND}