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 488B

123456789101112131415161718192021222324252627282930313233
  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 1 2> /dev/null)
  8. echo $s $v >> ${DATAFILE}
  9. done
  10. #----- do dome useless computations
  11. awk '
  12. NR==1 { debut = $2 }
  13. {
  14. # print $2-debut, $3
  15. v = int($3/25);
  16. bucket[v]++;
  17. }
  18. END {
  19. for (v=0; v<40; v++) {
  20. for (foo=0; foo<bucket[v]; foo++) {
  21. printf "-";
  22. }
  23. print "*"
  24. }
  25. }
  26. ' \
  27. < ${DATAFILE}