Hi, I've an issue in a shell script:
I'm opening an ssh connection to a remote server, then I want to store the result of a ls command in a variable, but it doesn't work: the ls is done on the local machine.
ssh user@server << EOF
ls # works as expected (ls is done remotely)
test=`ls` # the ls is done locally and not remotely
EOF
Note: I have to use EOF, because they are several others commands done during the ssh.
any solution for this problem ?