projects
/
SXSI
/
xpathcomp.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Do not pass -fno-PIC when compiling for x86 (since the option is
[SXSI/xpathcomp.git]
/
tests
/
comparison_tests
/
utils.sh
1
#!/bin/bash
2
function average() {
3
N="0"
4
I=0
5
while read x
6
do
7
if [ -z "$x" ]
8
then
9
I=0
10
break
11
fi
12
N="$N + $x"
13
I=$(($I+1))
14
done
15
if [ "$I" = "0" ]
16
then
17
echo
18
else
19
echo "scale=3; 1+(( $N ) / $I)" | bc -q
20
fi
21
}