I'm trying to pass a variable through a ssh connection, like this:
working_dir="/home/user/some_dir/"
ssh $USER@some_host 'qsub $working_dir/some_file.txt'
The connection itself is established, but this code gives me the following error:
working_dir: Undefined variable.
This could be explained, by the fact that the remote machine doesn't have the variable $working_dir since it was defined locally.
Is there a way of getting the value in the command locally?