Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1246

Python • Re: RRDtool & python3 code optimization

$
0
0
I found the solution :)

Code:

#!/bin/bashcd /home/z2/year/rrdtool=/usr/bin/rrdtoolarray=()while read line ; do  array+=($line)done < <(sudo --login -u z2 python3 /home/z2/year/twotemp.py)data1=${array[0]}data2=${array[1]}$rrdtool update year.rrd --template out:home N:$data1:$data2

Statistics: Posted by independent — Tue Nov 26, 2024 6:52 pm



Viewing all articles
Browse latest Browse all 1246

Trending Articles