perl -MNet::Ping -lne 'print "$_: ", scalar Net::Ping->new( "icmp" )->ping( $_ )' hosts.txt
perl -MNet::Ping -lne '$p = Net::Ping->new; $p->port_number( 80 ); print "$_: ", scalar $p->ping( $_ )' hosts.txt
No comments:
Post a Comment