From: Panther Date: 2003-01-29T08:43:50+09:00 Subject: Re: ping with ruby On Tue, 28 Jan 2003 14:43:54 +0000, Lyle Johnson wrote: > Panther wrote: > >> How can I do a script in ruby that to do a ping. > > http://www.ruby-lang.org/raa/list.rhtml?name=net-pingsimple I have installed it but with this script I have this error: Error pin.rb:5: parse error t = Net::PingTCP.new(192.168.1.1 Script require 'net/pingsimple' # check with udp or tcp ping t = Net::PingTCP.new(192.168.1.1) #u = Net::PingUDP.new(host) #e = Net::PingExternal.new(host) if t.ping puts "Host is alive" unless t.warning.nil? puts "Warning encountered: " + t.warning end else puts "Couldn't connect to host: " + t.exception end Please can you say me how to write a scrip correct that to do a ping to 192.168.1.1 ???? Thank you