Monitoring du Phytotron
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

33 lines
488 B

#!/bin/bash
DATAFILE=/tmp/fake-datafile
#----- collect the datas
> ${DATAFILE}
for s in $(seq 1 2000)
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
v = int($3/25);
bucket[v]++;
}
END {
for (v=0; v<40; v++) {
for (foo=0; foo<bucket[v]; foo++) {
printf "-";
}
print "*"
}
}
' \
< ${DATAFILE}