1 |
>>>>> On Sat, 3 Aug 2013, Micha³ Górny wrote: |
2 |
|
3 |
> Dnia 2013-08-03, o godz. 17:54:42 Ulrich Mueller <ulm@g.o> |
4 |
> napisa³(a): |
5 |
|
6 |
>> This looks just horrible. You do decimal arithmetic on octal |
7 |
>> numbers? |
8 |
|
9 |
> Yes. Bash wasn't really happy to do octal arithmetic for me. Yet in |
10 |
> this particular case, with proper assumptions, decimal arithmetic is |
11 |
> practically equivalent. |
12 |
|
13 |
Do you consider that in future maybe someone else has to maintain that |
14 |
code? IMHO we should avoid such hacks. |
15 |
|
16 |
Why don't you do the calculations in decimal throughout? You can |
17 |
convert to octal (using printf) in the last step. |
18 |
|
19 |
Ulrich |