Bash variable reading list

Written on 26 July 2016

Shell-Parameter-Expansion

For Loop bash index and value

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

https://www.gnu.org/software/bash/manual/html_node/Special-Parameters.html#Special-Parameters
http://unix.stackexchange.com/questions/193039/how-to-count-the-length-of-an-array-defined-in-bash