First page Back Continue Last page Graphics

Arrays: Use and Length

${myArray[3]} # one element

${myArray[$i]} # one element

${myArray[*]} # all elements

declare -a myArray=( 1 4 9 16 25 )

${#myArray[*]} # returns 5 elements

${#myArray[3]} # returns 2 characters