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"



cd: Too many arguments.

1 Answer 1


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .