Page 1 of 1

Execute program and read stderr?

Posted: Fri Dec 28, 2007 12:39 pm
by Inf0Byt3
Is there an altenative to the standard PB commands to execute a program and read from its stderr? I tried to search for this and couldn't find anything...

Re: Execute program and read stderr?

Posted: Fri Dec 28, 2007 3:01 pm
by Irene
Inf0Byt3 wrote:Is there an altenative to the standard PB commands to execute a program and read from its stderr? I tried to search for this and couldn't find anything...
You mean reading STDERR of a program purely in the shell?

Simple: APP_ERR="$(/usr/bin/application 2>&1)"
Now you have the $APP_ERR variable to play with ^o^

Posted: Fri Dec 28, 2007 3:27 pm
by Inf0Byt3
I've got it to work now. For whatever reason, when I am resizing gadgets in the code and try to read the stderr output, all i got back was an empty string. Had to change the flow a bit and it seems to be ok now.

Thanks for your help!