Follow the changes in XMLTree API: xml_tree::subtree_elements() does
[SXSI/xpathcomp.git] / tests / non_regression_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 }