I have this shell script in a file named a.sh:
export A='a'
export B=b
export C=1
export D=$USER # say $USER is root
There are some other similar files b.sh, c.sh, etc.
I need to read the shell file, say a.sh, from ruby script and convert it to a Ruby hash:
{ 'A' => 'a', 'B' => 'b', 'C' => 1, 'D' => 'root' }
How to achieve that?
ENVconstant.