From: Phlip Date: 2002-01-06T01:54:35+09:00 Subject: [ruby-talk:30292] Re: capturing both stdout and stderr of a subprocess Yohanes Santoso sez: > Hi, > > I am trying to programatically interact with another program, much like > expect. The problem is the interesting outputs are found both in stdout > and stderr. Both `...`, and IO::popen() captures only stdout. Is there > anyway to capture the stderr too? Or should I just > IO::popen("/bin/ksh_or_your_fav_shell -c 'aProg 2>&1'") ? /ruby-1.6.5/lib/open3.rb:# in, out, err = Open3.popen3('nroff -man') -- Phlip phlip_cpp@yahoo.com http://www.greencheese.org/MayorZogg -- Founding member of NuGWa - Nudists for Global Warming --