0

The following command line works both in Terminal and when called in a bash script:

cd /home/user/Schreibtisch/Tor_FF/tor-browser_en-US/Browser/ && TOR_FORCE_NET_CONFIG=0 ./start-tor-browser --allow-remote

However, when I put the command line in bash into a variable, I get an error message when using the variable.

variable="cd /home/user/Schreibtisch/Tor_FF/tor-browser_en-US/Browser/ && TOR_FORCE_NET_CONFIG=0 ./start-tor-browser --allow-remote"

$variable

Errormessage:

cd: Too many arguments.
1

You need to run it with eval $variable, otherwise everything after cd is passed as arguments to cd.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.