I have the following lines in my .cfg bash script file
DDF_SOURCE="siebel_DATA_DATE_FORMAT"
DATA_DATE_FORMAT=${!DDF_SOURCE}
how is ${!DDF_SOURCE
} evaluated? It would be !siebel_DATA_DATE_FORMAT
, which doesn't make sense to me.
bashvariable substitution
I have the following lines in my .cfg bash script file
DDF_SOURCE="siebel_DATA_DATE_FORMAT"
DATA_DATE_FORMAT=${!DDF_SOURCE}
how is ${!DDF_SOURCE
} evaluated? It would be !siebel_DATA_DATE_FORMAT
, which doesn't make sense to me.
Best Answer
That is an indirect expansion, documented in
man bash
section EXPANSION, subsection Parameter Expansion: