>>>>> On Sat, 3 Aug 2013, Michał Górny wrote:

> Dnia 2013-08-03, o godz. 17:54:42 Ulrich Mueller <u...@gentoo.org>
> napisał(a):

>> This looks just horrible. You do decimal arithmetic on octal
>> numbers?

> Yes. Bash wasn't really happy to do octal arithmetic for me. Yet in
> this particular case, with proper assumptions, decimal arithmetic is
> practically equivalent.

Do you consider that in future maybe someone else has to maintain that
code? IMHO we should avoid such hacks.

Why don't you do the calculations in decimal throughout? You can
convert to octal (using printf) in the last step.

Ulrich

Reply via email to