Bash Script Print Array Elements Indeks dan Nilai

for i in "${!foo[@]}"; do 
  printf "%s\t%s\n" "$i" "${foo[$i]}"
done
Brian Patterson