LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   suppress warning messages (https://www.linuxquestions.org/questions/programming-9/suppress-warning-messages-101314/)

h/w 10-07-2003 02:11 PM

suppress warning messages
 
from my previous post, on how to write the output of a command to a string; to extend it:

i'm now using system() to execute a command. it writes the output to the file i want, but also prints some messages and warnings to std out. is there a way i can suppress these messages which arent written to file?

thanks in advance (again).

markkam 10-07-2003 02:48 PM

Are you sure they aren't going to stderr?

If they are, and you are doing shell stuff (like maybe bash?) you can try adding ' 2>/dev/null' to the end of your command.

h/w 10-07-2003 02:56 PM

perfect - thank you very much.
cant really tell you how much help i got out here - ok, i think 4 times, but 4/4 is super.


All times are GMT -5. The time now is 01:34 AM.