I'm creating a script for CentOS 7 but I'm struggling to concatenate values based on variables, unlike other distributions that I worked. For example, in the code below:
DIR_BKP=/tmp/_bkp_local
PATH_LOG=$DIR_BKP/logs
echo $PATH_LOG
when I run, prints
/logs_bkp_local
As you can see, the echo returns mixing between the initial value of the overlapping variable with the new value.
I've tried
PATH_LOG="$DIR_BKP/logs"
PATH_LOG=${DIR_BKP}/logs
all print the same thing.
How can I do this simple task in CentOS?