-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaverage.sh
More file actions
executable file
·18 lines (16 loc) · 1.08 KB
/
average.sh
File metadata and controls
executable file
·18 lines (16 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# turn off printf in issorted.c
/bin/rm -f results/res
hel=$(./script.sh 1 5 300 | awk '{suma += $1}END{print suma}' | awk '{heh = $1/300}'END'{print heh}')
echo "5 el, 300 times = $hel\n" > results/res
hel=$(./script.sh 1 10 100 | awk '{suma += $1}END{print suma}' | awk '{heh = $1/100}'END'{print heh}')
echo "10 el, 100 times = $hel\n" >> results/res
hel=$(./script.sh 1 20 100 | awk '{suma += $1}END{print suma}' | awk '{heh = $1/100}'END'{print heh}')
echo "20 el, 100 times = $hel\n" >> results/res
hel=$(./script.sh 1 50 100 | awk '{suma += $1}END{print suma}' | awk '{heh = $1/100}'END'{print heh}')
echo "50 el, 100 times = $hel\n" >> results/res
hel=$(./script.sh 1 100 100 | awk '{suma += $1}END{print suma}' | awk '{heh = $1/100}'END'{print heh}')
echo "100 el, 100 times = $hel\n" >> results/res
hel=$(./script.sh 1 200 50 | awk '{suma += $1}END{print suma}' | awk '{heh = $1/50}'END'{print heh}')
echo "200 el, 50 times = $hel\n" >> results/res
hel=$(./script.sh 1 500 30 | awk '{suma += $1}END{print suma}' | awk '{heh = $1/30}'END'{print heh}')
echo "500 el, 30 times = $hel\n" >> results/res