Then just look for EXIT STATUS: ... in your captured output.my $cmd = q{ssh hosta -n "/tmp/test.sh; echo EXIT STATUS: $?"};
Alternatively, look at Net::SSH::Perl. The cmd method will return the output, error output and exit status of a remotely executed command.
In reply to Re: Pipe and return status through an "ssh"
by pc88mxer
in thread Pipe and return status through an "ssh"
by sdolancu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |