Date: Sat, 9 Nov 2019 16:39:52 +0100
From: Davide Brini <[email protected]>
Message-ID: <[email protected]>
| If you want to force base 10 interpretation (remember that leading 0 mean
| octal in arithmetic context), you need to explicitly tell bash:
|
| $ echo $(( 10#0123 ))
| 123
But do remember that that form is not portable, and is difficult to
use correctly in the cases that matter (when the actyal number comes
from a variable .. when it is literal, as in all the examples in this
thread, simply omitting the leading 0 is much simpler, and fully portable).
kre