在不指定Bash索引的状况下向数组添加新元素 - Add a new element to an array without specifying the index in Bash

问题:

Is there a way to do something like PHPs $array[] = 'foo'; 有没有办法像PHP同样$array[] = 'foo'; in bash vs doing: 在bash vs作: 数组

array[0] = 'foo'
array[1] = 'bar'

解决方案:

参考一: https://stackoom.com/question/8Bfu/在不指定Bash索引的状况下向数组添加新元素
参考二: https://oldbug.net/q/8Bfu/Add-a-new-element-to-an-array-without-specifying-the-index-in-Bash
相关文章
相关标签/搜索