working on fake values

This commit is contained in:
phyto
2019-01-27 13:03:59 +01:00
parent c462c9ad91
commit baec9fdb14
3 changed files with 21 additions and 6 deletions

View File

@@ -6,21 +6,28 @@ DATAFILE=/tmp/fake-datafile
> ${DATAFILE}
for s in $(seq 1 2000)
do
v=$(./fake-values -s -t 1)
v=$(./fake-values -s -t 4)
echo $s $v >> ${DATAFILE}
done
tail -5 ${DATAFILE}
#----- do dome useless computations
awk '
NR==1 { debut = $2 }
NR==1 {
debut = $2
}
{
# print $2-debut, $3
v = int($3/25);
v = int($3/35);
bucket[v]++;
}
END {
for (v=0; v<40; v++) {
for (foo=0; foo<bucket[v]; foo++) {
printf "%4d ", v;
for (foo=0; foo<bucket[v]/2; foo++) {
printf "-";
}
print "*"