I have a variable setup like this:
SSH_EXEC="ssh -X -o ControlPath=~/.ssh/master-$$ -o ControlPersist=60"
The parameter in question is the
-X, because if I then call this command within my local script
$SSH_EXEC user@server "./server_script.sh $aFile"
which in a nutshell does the following:
if [ -e /path/"$1".name ] || [ -e /path/"$1" ] then do something else error echo "/path/"$1".name" exit fi
Everything works! But if I replace
server_script fails to the
else on the test. I'd prefer not use x11, but I'm not sure what the difference is that is causing it to fail in one instance, and pass in the other.
So I just did more troubleshooting and decided to echo the value of
/path/$1.name on the server and it is garbled junk. If my
$aFile name happened to be
hello.name the result of the echo shows
.nameello and also rids the beginning of the path when I use
-t in place of
What could be causing the corruption of my variables?