Tell me how to solve the problem.
There is a machine 'A' and 'B'
Machine 'A' script that comes via ssh to machine 'B' and run the script.
The script is running, that puts it in the text files that it copies. Initialisere some variables. The question is how do I remotely get the value of variable to itself in machine 'A'.
A-> ssh user@b "cd /to/script && ./script.sh"
a=`ls-l | grep 'info`
b=`dmesg | grep 'error"
$a $b $c
How can I get after execution of the script the value of variables to their 'A'?
That would be something like this:
ssh user@b "cd /to/script && ./script.sh"
echo $a $b $c