I have a text configuration file something like this :
## COMMENT
KEY1=VALUE1 ## COMMENT
KEY2=VALUE2
KEY3=VALUE3 ## COMMENT
## COMMENT
As you can see, this has key value pairs, however it also contains comment lines and blank lines. In some cases, the comments are on the same line as the key value pair.
How do I read this config file and set the keys as variable names in a shell script so that I can use them as :
echo $KEY1