Let's say I have a config file containing the following:
variable1 = 25
variable2 = 36
I want to parse this file in a Bash script and set each respective variable to its proper value within my script. How do I do this? I have the code at the bottom, but all this does is display the content. I want to actually set the variables and their values in my script, then check whether a certain variable fulfills a condition, such as (pseudocode):
if "variable1 = 25", then echo "confirm"
IFS="="
while read -r name value
do
echo "Content of $name is ${value//\"/}"
done < filename