From: "weathercoach@..." Date: 2007-11-28T10:00:01+09:00 Subject: Re: How to redirect a "system" standard output and standard On Nov 27, 1:55 pm, Marc Heiler wrote: > > To clarify further I want to capture any standard output or standard error. I was dealing with this myself today. Here is the solution came across which works for me. I'm combining the stderr with stdout from the system call. You can remove the exitcode stuff if you dont need it. IO.popen("ls nofile 2>&1") {|f| output = f.read exitcode = Process.waitpid2(f.pid)[1] >> 8 puts "this is the output" puts output puts "this is the exit code" puts exitcode } #./test.rb this is the output nofile: No such file or directory this is the exit code 2 HTH. G.