Having the following content in a file:
VARIABLE1="Value1"
VARIABLE2="Value2"
VARIABLE3="Value3"
I need a script that outputs the following:
Content of VARIABLE1 is Value1
Content of VARIABLE2 is Value2
Content of VARIABLE3 is Value3
Any ideas?
given a config file as follows :-
the following one-liner will parse and hold the values :-
Now, let's break that down
This allows us to save values, without using eval or backtick. To be "really clean", we could remove [:space:] at the start and end of line, ignore "^#" lines, and remove spaces around the "equals" sign.