Currently I have a bash script with cd $PATH_TO_BUILD
where PATH_TO_BUILD=$(pwd)/develop/build
. The pwd does have a space in the name and is causing the error however I can't seem to escape this with double quotes. Even if I do PATH_TO_BUILD="$(pwd)"/develop/build
or put the $pwd in a different variable before I still get the error. How can I get around this?
Asked
Active
Viewed 28 times
0

Witcher18
- 59
- 5
-
3Is your script using `cd $PATH_TO_BUILD` (missing the `$` in your question), perhaps, and it should be using `cd "$PATH_TO_BUILD"`? – Jeff Schaller Nov 04 '21 at 20:14
-
Yes sorry typo will edit – Witcher18 Nov 04 '21 at 20:43
-
Does this answer your question? [How to concatenate string variables in Bash](https://stackoverflow.com/questions/4181703/how-to-concatenate-string-variables-in-bash) – Jeff Schaller Nov 05 '21 at 11:54