Task

Using two Arrays of equal length, create a Hash object
where the elements from one array (the keys) are linked
to the elements of the other (the values)



Related task

   Associative arrays/Creation


keys=( foo bar baz )
values=( 123 456 789 )
declare -A hash
 
for (( i = 0; i < ${#keys[@]}; i++ )); do
  hash["${keys[i]}"]=${values[i]}
done
 
for key in "${!hash[@]}"; do
  printf "%s => %s\n" "$key" "${hash[$key]}"
done