Date: Tue, 10 Jul 2018 18:46:32 -0400 From: Isaac Marcos <isaacmarcos100...@gmail.com> Message-ID: <ca+n9ptxfktmmqpabz+xmqk4pphix4x_yqy-w6tnyndr3ibo...@mail.gmail.com>
| set -- 34 034 0034 +34 +034 +0034 -34 -034 -0034 ; | for i do printf '%6s' "$((10#$i))"; shift; done; echo You really ought be only using POSIX defined sh operators, from two more POSIX compatible shells (in this regard...): jinx$ sh -c 'printf '%6s' "$((10#$i))"' sh: arithmetic: unexpected '#' (0x23) in expression jinx$ fbsh !* fbsh -c 'printf '%6s' "$((10#$i))"' fbsh: arithmetic expression: expecting EOF: "10#" Leading "base#" is not part of the sh language at all, and so should not be expected to work at all, let alone in any particular way. kre