In [ruby-talk:13033], Donald Sharp <sharpd / cisco.com> wrote:
> Or alternatively is there a better way to do this?
>
> When I do a:
>
> pipe = IO.popen( "/usr/atria/bin/cleartool", "r+" )
>
> # There's no such file as blah/blah so cleartool will output
> # that message on stderr.
> pipe.puts( "ls blah/blah\n" )
>
> # So the error message goes to the screen and the pipe.gets hangs.
> line = pipe.gets
>
> I'd prefer the ability to munge stdout and stderr what is the proper
> way( so I can interpret the result properly )?
>
> Thanks!
>
> donald 

Try ``pipe = IO.popen( "/usr/atria/bin/cleartool 2>&1". "r+" )''

If you're using a bourne-shell or bourne-shell(-like)-derivative, this will 
cause the redirect of stderr into stdout (along with stdout).  I'm not sure of 
how you'd do this in csh or csh-derivatives.

Henry.