Hi All,
I have a requirement where I have a config file, which contains 2 coulmn.values of first column are environmnet variable, whose value is defined in an environment file.
In my script I need to read the config file, and get the value of the config file variable from env file.
I have written below code. But its is not able to interprite the value from environment file.
environment file details.
export CONFIG=${APPS}/bin/config/${Application}
export DATA=${APPS}/DATA/${Application}
config file
CONFIG 30
DATA 30
My code
.<filepath>/EnvFile
if [ -f config.txt ]
then
Directory=( $(cat config.txt | awk '{print $1}') )
for Dir in ${Directory[@]} ;
do
....
.....
echo $Dir
....
....
.....
Expected result:
Echo $DIR
${APPS}/bin/config/${Application}
${APPS}/DATA/${Application}
Current Result :
echo $DIR
CONFIG
DATA
I tried with various options as echo `$DIR`, echo ${Dir} but nothing is helping.
I can make any suggested changes in config file, but can't make changes in evnrionment file.
Appriciate your help.