![](https://seccdn.libravatar.org/avatar/77cb4da5f72bc176182dcc33f03a18f3.jpg?s=120&d=mm&r=g)
-----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! :-) cer@nimrodel:~> 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: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org