DD2-monitor/exemple.sh

22 lines
332 B
Bash
Executable File

#!/bin/bash
DATAFILE=/tmp/fake-datafile
#----- collect the datas
> ${DATAFILE}
for s in $(seq 1 20)
do
v=$(./fake-values -s -t 1 2> /dev/null)
echo $s $v >> ${DATAFILE}
done
#----- do dome useless computations
awk '
NR==1 { debut = $2 }
{ print $2-debut, $3 }
' \
< ${DATAFILE}