5

Variable passing from nested SSH

view full story
linux-howto

http://www.unix.com – Hi - I am having an issue with the below code .. What I have is a script test.sh that calls an ssh session to a server (yes, I have public key setup and working). The problem that I am having is I want to be able to pass values back to the host script. For example: v_testlocal should return "TEST2" and v_test should return "TEST3". Code: #!/usr/bin/sh     v_test="TEST"     ssh user@server<<EOF   echo "$v_test"          # Returns TEST   v_testlocal="TEST2"   echo \$v (HowTos)