> I don't see an obvious problem with the code, so I suggest we start by
> validating ParsePING().  Without using HighLine at all, can you just
> manually call it with a few different parameters and make sure it is
> doing what you expect?
> 
> James Edward Gray II
Parseping is working well, here is it:

  def ParsePING(tvChann, tvIP, tvPort)
    puts"Checking: #{tvChann.upcase}, #{tvIP}:#{tvPort}"
    a = %x{mcfirst -t 10 -c 50 #{tvIP} #{tvPort}}
    a = a.split("\n")
    len= a.length
    for i in 0..len-1
      if a[i] != nil
        if a[i].match("Average") #search for line that matches text
          aa=a[i]
        else
          next
        end #if
      else
        next
      end #if
    end # for

    if aa ==nil
       puts "Something is wrong with: #{tvChann}, #{tvIP}:#{tvPort}"
       puts "I've not received any packets!"
       puts "================================================="
      else
       puts "#{aa}"
       puts
    end#if
 end # def

I think there may be something with HighLine...:(

Regards
-- 
Posted via http://www.ruby-forum.com/.