IngRRD/lib/readold
2015-01-30 12:09:03 +01:00

24 lines
324 B
Bash

#!/bin/bash
readold() {
local when=$1 \
line \
dataindex \
empty \
id \
LANG=C
{
read line
dataindex=( $line )
read empty
read first['time'] $(
for id in ${dataindex[@]}
do
echo "first['"$id"']"
done
)
} < <(
rrdtool fetch -s "$when" ingress.rrd AVERAGE | sed '/: nan/d'
)
}