|( #3333=superdoc: print w/replies, xml )||Need Help??|
There are a number of errors in your code. For one, you are opening PINGIN inside the loop but only closing it outside the loop. Also your regular expression search when looking throught the log is missing a * so it will never match (it should be "([0-9.]*)" )
Finally I think you've got the case wrong, because ping returns the 64 bytes line when machines are available!
All that aside, there's a much easier way to do what you're trying to do, just use the backtick operator, like this:
That will load the results of the command into an array which you can then process with a single grep command:
-I went outside... and then I came back in!!!!
In reply to Re: batch ping problem
by Henri Icarus