5 echo "$0 -i <file1> -j <file2> -o <result>"
19 test -f ${IN1} && test -f ${IN2} || usage
22 echo "merging stat file"
23 for PARAM in `awk '$1 == "#" {print $2}' ${IN1}`
25 echo "merging ${PARAM}"
26 V1=`awk -v P=${PARAM} '$2 == P {print $4}' ${IN1} `
27 V2=`awk -v P=${PARAM} '$2 == P {print $4}' ${IN2} `
28 R=`echo "${V1} + ${V2}" | bc`
29 test -z "${R}" && continue
30 echo "# ${PARAM} = ${R}" >> ${TMP}
32 mv -f ${TMP} ${RESULT}