Home > OS >  export variables in bash script
export variables in bash script

Time:07-06

I need to uplift existing bash code. I need to understand, can someone help what below code is doing?

#Export Account Environment Variables:
. ${BASE_DIR_PATH}/account.properties

I can see the file 'account.propterties' available on BASE_DIR_PATH having variable related to environment.

CodePudding user response:

This line of code simply executes the commands, present in that "account.properties" file. Seen from your explanation, I imagine the content of that file being something like:

var1=value1
var2=value2
...

So, it looks like a kind of "environment variable initialisation" file. In order to have more information, you might need to edit your question and add the content of that "account.properties" file.

P.s. the first line starts with "#", which means that it is just comment and does not get executed.

  •  Tags:  
  • bash
  • Related