[SunHELP] decimals and ksh division

Luc I. Suryo luc at suryo.com
Fri Oct 17 11:06:12 CDT 2003


> How can I show decimals in ksh?
> 
> example: 
> $ print $((45/10))
> 4
> 
> I want to show 
> 4.5

 echo 45 10 | nawk '{printf("%0.2f\n", $1/$2);}'

will that work for you?

- ls



More information about the SunHELP mailing list