declare -a AN_ARRAY AN_ARRAY=( element1 element2 element3 element4 element5 ) # Indexing starts at zero AN_ARRAY[0] # Loop over elements for ELEMENT in "${AN_ARRAY[@]}"; do echo $ELEMENT done