Why not use the command timeinside the bashscript, something like:
#!/bin/bash
NPROG=`cat proglist | wc -l`
for i in `seq 1 ${NPROG}`
do
PROG=`sed -n "${i}p" proglist`
ARG=`sed -n "${i}p" arglist`
TIME=`{ time ${PROG} ${ARG}; } 2>&1 | grep real | awk '{print $2}'`
echo "${TIME} ${PROG} ${ARG}"
done
where proglistis a text file containing programs to execute
A
B
B
arglist - , , :
-a 1 -b 2
-f "foo"
-f "bar"
script :
0m32.000s A -a 1 -b 2
1m12.000s B -f "foo"
5m38.000s B -f "bar"