I'm learning about bash shell and environment variables.
I have tested echo a env. var surrounded by quotes and without them (I put it like it appears on my terminal):
user@pc:~$ echo "$BASE_DEPENDENCIES"
build-essential \
cmake \
debhelper \
mesa-utils \
cppcheck \
xsltproc \
python-psutil \
python \
bc \
netcat-openbsd \
gnupg2 \
net-tools \
locales
user@pc:~$ echo $BASE_DEPENDENCIES
build-essential \ cmake \ debhelper \ mesa-utils \ cppcheck \ xsltproc \ python-psutil \ python \ bc \ netcat-openbsd \ gnupg2 \ net-tools \ locales
The first one has new lines and spaces. The second one is only one line.
Why does it happen?
By the way, my system is an Ubuntu 17.04.