I need to have an array for each "section" in the file containing:
[array0]
value1=asdf
value2=jkl
[array1]
value1=1234
value2=5678
I want to be able to retrieve these values like this:
echo ${array0[value1]}
echo ${array0[value2]}
echo ${array1[value1]}
echo ${array1[value2]}
Any thoughts on how to accomplish this? (Explanations would be a bonus)
I've already read these anwsers but none do exactly what I want to do.
Read a config file in BASH without using "source"