From: Sebastian Hungerecker Date: 2007-07-28T04:57:48+09:00 Subject: Re: Execute one Ruby script from inside another... sketchitup@gmail.com wrote: > I'd still like to know if Ruby can execute external programs. It sure can: system("app") will execute app with the parameters arg1 and arg2. It will return true if the programm exited successfully, false otherwise. app's output will go to stdout (unless you redirect it). `app` or %x{app} will execute app and return its output as a string. IO::popen("app",mode) will execute app and immediately return an IO object (i.e. unlike the previous options it won't wait for app to finish). You will be able to interact with app using said IO object. Open3::popen3("app") works the same way as popen, except it gives you *three* IO objects. One to write to app's input stream, one to read from its output stream and one to read from its error stream. That's it. HTH, Sebastian -- NP: Anathema - Are you there? Ist so, weil ist so Bleibt so, weil war so