for time in ${TIMES}; do
HOURS=$(( $HOURS + $(echo ${time} | sed "s!^\([0-9]*\)\..*!\1!g") ))
-
+
# The first SED command extracts the minutes (fractions of an hour).
# The second SED command removed the leading zero, if applicable.
MIN=$(( $MIN + $(echo ${time} | sed "s!.*\.\([0-9][0-9]\)!\1!g" | sed "s!^0\([0-9]\)!\1!g" ) ))
done
-
+
HOURS=$(( ${HOURS} + ( ${MIN} / 100 ) ))
MIN=$(( ${MIN} % 100 ))
-
+
echo "${HOURS}.${MIN}"
}