-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The Monday 2007-12-10 at 22:55 -0500, Carl Hartung wrote:
On Mon December 10 2007 09:34:34 pm Carlos E. R. wrote:
Obviously, it is thinking it is an octal number. How do I convince bash
to use standard base ten math? Is there a prefix?
Hi Carlos,
A bit of Google research reveals the prefix '10#' tells bash to use base 10
(decimal) instead octal interpretation. What happens if you try this (or some
derivative?) :-)
Yes! Thanks! :-)
[EMAIL PROTECTED]:~> echo $[ (00 - 00)*3600 + (21 - 21)*60 + (10#08 - 10#09) ]
- -1
DIFF=$[ (10#$LOC_H - 10#$HWC_H)*3600 + (10#$LOC_M - 10#$HWC_M)*60 +
(10#$LOC_S - 10#$HWC_S) ]
Yes, of course. Done.
Wish I were more confortable with google... didn't know what to tell it to
search.
- --
Cheers,
Carlos E. R.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
iD8DBQFHXmRvtTMYHG2NR9URArpgAJ9joWutdevElt9gd9hMc3QzJO/rkACdHrMU
Ued+V3uxqFBEV6a8miuTwlM=
=6ZXm
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]