One of the new features in Bash v4 are the associative arrays using strings as index instead numbers
here a small example of use
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 | #!/bin/bash declare -A myArray #declare array myArray[ cat ]=gato #attach a value into index cat myArray[dog]=can #attach a value into index dog creature= "fish" #declare a variable myArray[$creature]=peixe #attach a value into index fish #get all array values for key in "${!myArray[@]}" do echo "index value=$key content value= ${myArray[$key]}" done |