Execute program and read stderr?

Linux specific forum
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Execute program and read stderr?

Post 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...
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Irene
Enthusiast
Enthusiast
Posts: 461
Joined: Thu Oct 04, 2007 12:41 pm

Re: Execute program and read stderr?

Post 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^
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post 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!
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Post Reply