Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-07-2003, 02:11 PM   #1
Senior Member
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
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).
Old 10-07-2003, 02:48 PM   #2
LQ Newbie
Registered: Oct 2003
Posts: 4

Rep: Reputation: 0
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.
Old 10-07-2003, 02:56 PM   #3
Senior Member
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Original Poster
Rep: Reputation: 46
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Daily warning messages - why not emailed? kalahari875 Mandriva 3 01-23-2005 06:52 AM
Nautilus warning messages !! DipeshKhakhkhar Linux - Software 1 11-18-2004 11:14 AM
Mimedefang warning messages sloop Linux - Software 0 11-15-2004 09:11 PM
bash scripting - suppress error messages? brian0918 Programming 2 06-19-2003 11:16 AM
Recompiling kernel : warning messages - why? Q*Bert Linux - Software 3 03-07-2003 01:34 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:54 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration