Jason Mayer wrote: > Hi! > > I've been learning ruby for a little while, but I'm having trouble > figuring out how to do this (and I must be using the wrong keywords in > my google search). I do tech support, and I'm looking to automate > some basic troubleshooting over a web interface for my coworkers and > new hires. > > What I'd like to do is script the windows ping command and scrape the > results. Anyone know where I can find good references on this? > > So I guess my question could be clarified as How do I script windows > command line commands via ruby (I understand that in linux I could > just use `ping xxx`)? Yes, that's right, and it works in Windows (under Ruby) the same way. But clearly this didn't work for you. So, what did you try, and what was the result? Have you tried: data = `ping -n 1 hostname`.chomp > The second question would be 'How do I scrape the output of a windows > cmd.exe command and use it in the rest of my script?' This should work: data = `cmd.exe /C command`.chomp Again, it would help to see what you tried and what you got. -- Paul Lutus http://www.arachnoid.com