In case of any error in shell script, it returns non-zero value and then control is returned to the script file provided as input to WinSCP.com.
But this script continues to execute further commands as previous call command (which has now executed shell script) was successful. But it does not check whether the execution of shell script was successful or not.
I want a behaviour where that script will return with exit code non-zero whenever shell script returns with error.
I am posting here some part of my script provided to WinSCP.com
. . . . . . call sh script.sh mkdir /home/user/temp . . . close exit
So in this code i want WinSCP.com to stop execution whenever script.sh exits with non-zero return code.
How can I achieve this?