perl script help needed.

prabhu.anandh at wipro.com prabhu.anandh at wipro.com
Tue Mar 2 06:14:02 CET 2004


Hi folks,
I have written a perl script to execute ping command and store the
result in a file called out.i am not able to do it.since it doesn't give
the output in the out file.please guide me to write into that file.

This is my perl script.

#!/usr/bin/perl
$input=<STDIN>;
exec "/usr/bin/ping $input> out";

And also give me an idea how to give input along the script 
Like XXXX.pl 10.20.X.X then <enter>
Instead of XXXX.pl  <enter> then giving
10.20.X.X   <enter>

I am new to these perl scripts.i need your help greatly.

Thanks in advance.

Regards,
Prabhu Anandh


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list