2007/10/2, Kurt H Maier <[EMAIL PROTECTED]>: > I could never get the precision set right. It would either round to > the nearest ten, or there would be a decimal. After about ten minutes > of trying to make it output a value with length 0 and scale 1 or 2, I > used perl. >
just divide by 1.0, ie: else BATT_REMAIN_HR=`echo "($BATT_CAPACITY/$BATT_RATE)/1.0" | bc` BATT_REMAIN_MN=`perl "(($BATT_CAPACITY/$BATT_RATE*60)%60)/1.0 | bc` fi