I start bash from Java app and I have in my path for command which executes inside bash spaces ( example cd /Documents and Settings/test ), I run command with Process Builder but it doesn't work when path have spaces. I try to replace spaces with %20 but not help. What to do ?
You can either encapsulate the full path in quotion marks like this:
String quoted = "\"" + pathString + "\"";
or, as you use bash, escape the spaces:
String escaped = pathString.replace(" ", "\\ ");
Both should work as an argument for your cd
command.
encapsulate the whole path between quotations.
cd "/Documents and Settings/test"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With