ARRAY=( "engineer " "CEO" "doctor" "teacher" ) for i in "${!ARRAY[@]}" do echo " index---------------content" echo " $i ${ARRAY[$i]}" done