I have a config file in unix as
Variable_name:sequences:Status
ABC:1234:/path/txt
and I have a script in unix as
$ABC="select * from table"
I want to pass the variable name from file and use the variable in script with the value in script.
so I need to run script like
for i in /path/file_config;
$Variable=ABC
echo $variable # need result "select* from table"
Please help me in this
$ABC=and$Variable=are invalid. That's not how you assign to variables.var=ABC; grep "^\$${var}=" /path/config | cut -d '"' -f2. Is that correct?