From 556feaa3be2413a1bbbb0cf7528f220c27263275 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Tue, 23 Mar 2010 12:35:20 +0000 Subject: [PATCH] grml --- sensor_graph/sample_sensors.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sensor_graph/sample_sensors.sh b/sensor_graph/sample_sensors.sh index ed902d5..6474ed5 100755 --- a/sensor_graph/sample_sensors.sh +++ b/sensor_graph/sample_sensors.sh @@ -4,9 +4,9 @@ echo -e "listen sensor\n" | usocket /var/run/powersensordaemon/cmd.sock -n | ./s PID1=$! echo -e "listen movement\n" | usocket /var/run/powersensordaemon/cmd.sock -n >> /tmp/movement.tmp & PID2=$! -trap "kill $PID1 $PID2" 0 +trap "kill $PID1 $PID2" 0 INT QUIT while sleep 30; do - L=$(wc -l /tmp/movement.tmp | cut -d' ' -f1) + L=$(wc -l /tmp/movement.tmp | sed 's/[^0-9]*//g') echo -n > /tmp/movement.tmp rrdtool update /home/sensormovement.rrd -t movement N:$L done -- 1.7.10.4