Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

How do I capture shell error messages from a remote host?

by jfw2112 (Initiate)
on Jul 26, 2002 at 23:42 UTC ( [id://185695]=perlquestion: print w/replies, xml ) Need Help??

jfw2112 has asked for the wisdom of the Perl Monks concerning the following question:

I'm using the module Net::Telnet and running system commands on a remote host? When a system command doesn't work, I don't see any of the shell error messages. Where do these shell error messages go and how do I capture them? John....

Originally posted as a Categorized Question.

  • Comment on How do I capture shell error messages from a remote host?

Replies are listed 'Best First'.
Re: How do I capture shell error messages from a remote host?
by kiseok7 (Beadle) on Jul 31, 2002 at 17:13 UTC
    just a way :

    capture STDERR to file and `cat the file`

    $stdout = $t->cmd("some_cmd 2> /tmp/error.tmp"); $stderr = $t->cmd("cat /tmp/error.tmp; rm /tmp/error.tmp");
    i can't sure it is good answer =(

    good luck!
Re: How do I capture shell error messages from a remote host?
by jfw2112 (Initiate) on Aug 03, 2002 at 01:26 UTC
    Thanks kiseok7. Your suggestion pointed me in the right direction. John...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-25 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found