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.

exemple.sh 529B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. DATAFILE=/tmp/fake-datafile
  3. #----- collect the datas
  4. > ${DATAFILE}
  5. for s in $(seq 1 1000)
  6. do
  7. v=$(./fake-values -s -t 4)
  8. echo $s $v >> ${DATAFILE}
  9. done
  10. tail -5 ${DATAFILE}
  11. #----- do dome useless computations
  12. awk '
  13. NR==1 {
  14. debut = $2
  15. }
  16. {
  17. # print $2-debut, $3
  18. v = int($3/35);
  19. bucket[v]++;
  20. }
  21. END {
  22. for (v=0; v<40; v++) {
  23. printf "%4d ", v;
  24. for (foo=0; foo<bucket[v]/2; foo++) {
  25. printf "-";
  26. }
  27. print "*"
  28. }
  29. }
  30. ' \
  31. < ${DATAFILE}