Bash arrays and negative subscripts, yes or no?

后端 未结 5 2048
感动是毒
感动是毒 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:41

    According to Greg Wooledge's wiki, (which links to the bash changelog) the negative index syntax was added to bash in version 4.2 alpha.

提交回复
热议问题