The same piece of code is working fine and returning correct return when executed on the same shell manually
I was thinking that all the collective input to expect->send command also executes on the some shell, so it should contain the command execution status value rather than the shell exit value, as the "echo COMMAND_RET:$?" gets executed before the shell exit.
In reply to Re^2: Incorrect value 0 reported in command execution return value variable $?, when trying with expect->send command
by Davewhite
in thread Incorrect value 0 reported in command execution return value variable $?, when trying with expect->send command
by Davewhite
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |