in reply to Pipe and return status through an "ssh"
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.
|
|---|