Bash Arrays
Jump to navigation
Jump to search
Internal
Indexed Arrays
External
- http://www.gnu.org/software/bash/manual/html_node/Arrays.html#Arrays
- http://tldp.org/LDP/abs/html/arrays.html
Overview
bash indexed arrays are 0-based and unidimensional. No explicit declaration is necessary if at least one element is initialized as described below:
Declaration
Initialization
Individual elements are initialized by using [...] notation:
a[0]="something"
Reference
Element arrays can be referenced with ${var-name[index]} notation:
echo ${a[0]}