printf "%10.2f" 1234567891011

No cookies for any of you :)... Unless you tell me of a better way :) 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Andrew Wilson
Sent: Friday, 26 March 2004 11:16 AM
To: [EMAIL PROTECTED]
Subject: [SLUG] Decimal places in bash script



Hello all,
Probably an easy one .. but its friday.. i have a headache and a spare copy for the 
person that provides the answer.

I have a script that is returning me number varibles with decimal places in them. 
e.g

129.384756%
75.12872%

What bash command would i use to round this above numbers to 2 decimal places.

Cheers

Andrew Wilson

* Dangles cookie *
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to