I have access to a list of folders that have a format like
lastname, firstname(id)
When I try to enter the folder from the terminal, it looks like
cd test/lastname,\ firstname\(id\)
I am not sure why there are backslashes where there aren't any spaces. My script has access to the credentials and I generated the exact format with the backslashes, but I still cannot enter the folder from the bash script. The variable I use is like this:
folder="lastname,\ firstname\(id\)"
When I do cd $HOME/test/$folder/
it says there is not such folder. I tried a couple of solutions suggested on different questions, but haven't worked. Putting it within double quotes on the folder variable, and also on the entire expression also didn't work. I guess I don't know what is going wrong and hence cannot get it to work. It'd be awesome if someone could help me out here!
folder='lastname, firstname(id)'
? – Sundeep Oct 12 '16 at 06:30