Skip to content
Snippets Groups Projects
Commit f2371226 authored by Felton Samuel's avatar Felton Samuel
Browse files

Added script to sum statistics in each machine for each test

parent a997d36b
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
for test_ver in `ls test`
do
win_v1=0
win_v2=0
draw=0
rm "test/$test_ver/res.stats"
for file in `ls test/$test_ver/*.stats`
do
read -r line < $file
IFS=' ' read -r -a wins <<< "$line"
win_v1=$((win_v1 + wins[0]))
win_v2=$((win_v2 + wins[1]))
draw=$((draw + wins[2]))
done
echo "$win_v1 $win_v2 $draw" > "test/$test_ver/res.stats"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment