On Wed, Aug 02, 2023 at 12:14:51PM +0000, Thomas Schweikle wrote: > > > Am Mi., 02.Aug..2023 um 13:45:26 schrieb Peter N. M. Hansteen: > > On Wed, Aug 02, 2023 at 11:35:39AM +0000, Ioan Samarul wrote: > > > Can you please tell me if this is a bug or it is considered normal? > > > > > > $ set -A test a b c d e f g h i > > > $ echo ${test[07]} > > > h > > > $ echo ${test[08]} > > > ksh: 08: bad number `08' > > > $ echo ${test[8]} > > > i > > > > I strongly suspect you stumbled on to a case of the old convention > > "numerals with > > leading zeroes are interpreted as octal notation" (but do check the > > underlying > > code to make sure). > > Yes, that is it. It is considered octal notation.
And here is the proof: $ echo ${test[010]} i