i’m trying to script administrative tasks in windows and i’m really
not feeling the ruby love, does anyone have some suggestions on a way
of running commands and catching STDERR in windows?
On Sun, Mar 2, 2008 at 7:24 AM, [email protected]
[email protected] wrote:
i’m trying to script administrative tasks in windows and i’m really
not feeling the ruby love, does anyone have some suggestions on a way
of running commands and catching STDERR in windows?
Try:
- win32-open3 gem
- use Kernel#system or `` (backticks) and redirect output to a file
or pipe. Windows from 2000 up supports stderr
redirection ( command 2> err.txt )
thanks, thats giving me the io objects back.
when i run this in production it seems to die while trying to read
from the Output IO object, if its
io_in, io_out, io_err = Open3.popen(‘some command with parameters’)
out = io_out.read (hangs here forever if the command should have worked)
On Sun, Mar 2, 2008 at 10:11 AM, [email protected]