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).

- Peter

-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
https://bsdly.blogspot.com/ https://www.bsdly.net/ https://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.

Reply via email to