Skip to main content
title; tags
Source Link
Gilles 'SO- stop being evil'
  • 866.1k
  • 205
  • 1.8k
  • 2.3k

Bash script variable Variable substitution with an exclamation mark in bash

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.

Thanks

Bash script variable

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.

Thanks

Variable substitution with an exclamation mark in bash

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.

Tweeted twitter.com/#!/StackUnix/status/215890515323912192
Source Link
van
  • 1.1k
  • 1
  • 9
  • 9

Bash script variable

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.

Thanks