Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://89122]
help
Chatterbox?
[Discipulus]: see you monks!
[Lady_Aleena]: shmem, let me get this sub rewritten, then I will look into how to use ctags in geany. Deal? 8)
[shmem]: Discipulus: yeah, that might eventually prepare the path for OO ;-)
[Lady_Aleena]: See you, Discipulus.
[shmem]: Lady_Aleena: that's up to you. I only wanted to show you a path that might be more comforting than command line grep ;-)
[Lady_Aleena]: shmem, I don't think any of my modules could be converted to OO. They are too procedural.
[Lady_Aleena]: Now I will see if my perl-fu is as bad as I think it is.
[shmem]: ah, geany uses its own idea of tags. Ah well...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2017-04-27 12:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (506 votes). Check out past polls.