Bash arrays and negative subscripts, yes or no?

后端 未结 5 2066
感动是毒
感动是毒 2021-02-08 00:32

The GNU bash manual tells me

An indexed array is created automatically if any variable is assigned to using the syntax

name[subscript]=v         


        
5条回答
  •  鱼传尺愫
    2021-02-08 00:56

    If you do man bash the section on arrays does not list this behavior. It might be something new (gnu?) in bash.

    Fails for me in CentOS 6.3 (bash 4.1.2)

提交回复
热议问题