I would like to ask a question about how to use PuTTY and control its return values. My setup is this.
Here is a file xxxxx.batthat contains a PuTTY call with an ssh connection in the following cases:
putty.ext ssh 10.10.10.10 -l xxxx -pw yyyy -t -m wintest.txt
The file wintest.txtcontains:
echo "wintest.txt: Before execute..."
/home/tede/n55115/PD/winlinux/RUN.lintest.bsh
echo "wintest.txt: After execute..."
echo $?
The file lintest.bshcontains various commands, which interests me in order to be able to capture the return value of a specific command in the .bsh file and call this value from the bat file to add it to the if loop with a warning, i.e. if $?(or %ERRORLEVEL- I don't know what will work) thenBLABLA
, , , , - .bat, .