[ILUG-BOM] bc and bash scripting woes

Parvez Lanewala parvez@[EMAIL-PROTECTED]
Tue Jan 15 20:23:03 IST 2002


> > for i in `seq 0 10`;
> > do
> >     SUM=`echo $SUM+${ARR[$i]}|bc`
> > done
> 
> SUM=$(($SUM + ${ARR[$i]}))
> 

i need 'bc' to work, cause i need float values. is there any other way to
have float values in shell variables.

parvez


-- 
Walk softly and carry a big stick.   -- Theodore Roosevelt 



More information about the Linuxers mailing list