variable from remote script to local script
I have written a script for memory management at remote machine.
Scenario is like:
1. SSH will read details from prop file of server to connect.
2. Then set node variable in script.
3. scp the script to remote machine.
4. Run memory management commands on remote machine.
5. send back the variable to local machine with memory info in integer.
6. I will pass the info to script to create files based on the integer provided.
I'm successful doing this above steps at local machine.
My problem is with passing the calculated memory as variable back to local machine. So my issue made me stuck at point 5.
how i can pass the variable back to script in the same session or same running shell.