I have a shell script, where I have included a file which contains variables with some assigned values.
When I execute the shell script to concatenate the variables from the included file, it is behaving weird.
Here when the variables are echoed separated, they provide expected value. But when I concatenate the two variables, the second variable is overwriting the first one.
Config File - conf.cfg
var1=xxxxxxxx
var2=yyyyyy
Show Script - Show.sh
source ./conf.cnf
echo $var1
echo $var2
echo $var1$var2
Expected Result
xxxxxxxx
yyyyyy
xxxxxxxxyyyyyy
Actual Result
xxxxxxxx
yyyyyy
yyyyyyxx