While working with Config files (user defined variables in file) I need below requirement. I have variables in config files and need to read variables from files and order of precedence. Example as given below
Main parameter (default) file.
param.ini:
Var1=today
Var3=xyz
Override parameter file (adhoc override changes)
Param.override:
var1=yesterday
var2=123
My script as given below
test.sh:
. ~/param.override,~/param.ini
echo "run day -> $var1"
Result i need is
run day -> yesterday
I remember we can achieve this using dot operator or Source command in Unix. Please help me what will be syntax for script to call variable from multiple files.