Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: test version of ssh from windows

by mariog (Acolyte)
on Aug 11, 2015 at 15:28 UTC ( [id://1138184]=note: print w/replies, xml ) Need Help??


in reply to Re: test version of ssh from windows
in thread test version of ssh from windows

Hello

it works but the messages are too long.

I do not know if I can change the text of the variable $!?

.

This script will be integrated into nagios later with nsclient and nrpe so the messages have be short.

Replies are listed 'Best First'.
Re^3: test version of ssh from windows
by stevieb (Canon) on Aug 11, 2015 at 15:34 UTC

    In my reply above using eval, you can trap and then reword the errors as you see fit. Here's a short example.

    eval { open my $fh, '<', 'asdf' or die $!; }; if ($@ =~ /No such file or directory/){ print "short error msg\n"; # or... die "short msg"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-03-28 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found