Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: exit status of a remote program

by btrott (Parson)
on Jun 17, 2001 at 06:28 UTC ( #89122=note: print w/ replies, xml ) Need Help??


in reply to exit status of a remote program

If you can use ssh instead of rsh (which maybe you should be doing anyway :), you can use Net::SSH::Perl, which has a method to execute a command remotely and get back the stdout, stderr, and exit status.

use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new($host); $ssh->login; my($out, $err, $exit) = $ssh->cmd($cmd);
Exit status of remote command is in $exit.


Comment on Re: exit status of a remote program
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://89122]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (14)
As of 2015-07-06 16:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls