In modifying some released code on my distro, I ran into the
of $[arith] as a means for returning arithmetic evaluations of the
I vaguely remember something like that from years ago, but never see any
it -- yet it works, and old code seems to rely on it -- and
"$[(1+2)/3]" looks cleaner than "$(((1+2)/3))". So what's up with that?
If it wasn't designed to run in non-bash environments, I might think it was
an artifact of array evaluation.. I.e. with no array name after $,
instead of that
number being used as an index for the array, it's returned as a raw
I've seen it in code designed for 'sh'...
Is it an accidental omission from the bash manpage?