Bash decimal arithmetic?

Graham Campbell gc1111 at optonline.net
Thu Nov 11 03:18:32 UTC 2004


On Wed, 2004-11-10 at 21:22 -0500, Dean Maluski wrote:
> Does bash have an option to do non integer math in scripts?
> I need my exact decimal numbers.
> 

An "exact decimal number" is a contradiction in terms. If you can
specify the precision you wish to retain then use bc to do the
calculations.
-- 
Graham Campbell <gc1111 at optonline.net>




More information about the users mailing list