From: Rodrigo Bermejo Date: 2008-03-15T04:16:48+09:00 Subject: Re: How to separate stdout & stderr from executed shell comm unknown wrote: > On Mar 14, 11:40 am, jqwo...@gmail.com wrote: >> >> irb> my_exec_command("ls NON_existant_file") >> => ["", "ls: NON_existant_file: No such file or directory\n", 2] >> >> Any pointers on how to implement my_exec_command? > > PS: Unless there's a simpler way, if someone could just point me to an > API that provides stdout and stderr of sub-processes as IO objects, I > could probably figure it out from there. Thanks! Take a look at the IO class. The Pickaxe book has some good examples. -r. -- Posted via http://www.ruby-forum.com/.