I am trying to pass a variable through an ssh connection, for example:
working_dir="/home/user/some_dir/"
ssh $USER@some _host 'qsub $working_dir/some_file.txt'
The connection is established, but this code gives me the following error:
working_dir: Undefined variable.
This can be explained by the fact that there is no $working_dir variable on the remote computer, since it was defined locally.
Is there a way to get the value in a command locally?
source share