_checker 324 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. first_test=1
  3. last_test=10
  4. executable=tracer_test
  5. for i in $(seq $first_test $last_test); do
  6. ./"$executable" $i
  7. done | tee results.txt
  8. cat results.txt | grep '\[.*\]$' | awk -F '[] /[]+' '
  9. BEGIN {
  10. sum=0
  11. }
  12. {
  13. sum += $2;
  14. }
  15. END {
  16. printf "\n%66s [%03d/100]\n", "Total:", sum;
  17. }'
  18. rm -f results.txt