Last modified on 30 November 2010, at 02:57

Shell Programming/Arrays

To assign a value to an element of an array simply do


To expand the value of an index of an array do

${ArrayName[2]}   # This equals 'ValueForArrayNameIndex2'

The arrays don't need to be full or compact (i.e. there can be null values between some interval of indexes).