|
From: | Paolo Bonzini |
Subject: | Re: [Help-smalltalk] Pipe capturing from stdout and stderr? |
Date: | Tue, 25 May 2010 09:29:56 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.4 |
On 05/25/2010 02:19 AM, Rick Flower wrote:
Paolo et-al, I've got a script that uses a pipe to issue commands and retrieve the output for parsing.. All is good but I found out today that one of the commands I'm invoking generates output to stderr in addition to stdout. The stderr stuff is sent directly to the terminal session while gst sees the stdout stuff.. Is there a way to also capture the stderr stuff and either parse it separately (or discard) or merge the two together for combined parsing?
Having a full-blown class for spawning children processes is on the todo list.
In the meanwhile, you can pass 2>&1 or 2>/dev/null at the end of the popen command, though this will sacrifice portability to Windows of course (but I guess you don't care).
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |