Within bash shell, I need to add numbers in the format : 0.13281E-04
and -0.79254E-04
.
So, in the script, I have:
tt1=`echo $var_t1| sed -e 's/[eE]+*/\\*10\\^/'`
tt2=`echo $var_t2| sed -e 's/[eE]+*/\\*10\\^/'`
var_t=`echo "($tt1 + $tt2)/2.0" | bc -l`
which gives result as: -.000032986500000
Is there any straight forward way getting var_t as -3.29865E-05
?