I have a directory named "test 1" and I create a variable
dest="test\ 1"
I want to navigate to the directory using the cd command, so I type
cd $dest
which gives the output as
-bash: cd: too many arguments
while typing
cd test\ 1
actually works and changes the current directory to "test 1".
Now, I've read a few other questions and know that I've to type in
cd "$dest"
for it to work but I don't understand the reason why. Because $dest will basically substitute the value of the variable dest which is nothing but test\ 1. So why does this not work?