BASH question

Andy Green andy at warmcat.com
Thu Sep 7 07:47:11 UTC 2006


M.Lewis wrote:

>> No floating point support :-)  But even then, be liberal with spaces
>>
>> PERMINUTE=$(( 29 / 432000 ))

> Thanks Andy, that resolved the error, but returns $PERMINUTE as 0. It 
> should be something like .00067xxxxx. Is there a way to do that?

Farm it out to bc

echo "scale=10 ; 28.95 / 432000" | bc

-Andy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4492 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060907/ad8e4465/attachment-0001.bin>


More information about the fedora-list mailing list