LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



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

Rep: Reputation: 45
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, 03:48 PM   #2
markkam
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, 03:56 PM   #3
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

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


Reply


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 07:52 AM
Nautilus warning messages !! DipeshKhakhkhar Linux - Software 1 11-18-2004 12:14 PM
Mimedefang warning messages sloop Linux - Software 0 11-15-2004 10:11 PM
bash scripting - suppress error messages? brian0918 Programming 2 06-19-2003 12:16 PM
Recompiling kernel : warning messages - why? Q*Bert Linux - Software 3 03-07-2003 02:34 PM


All times are GMT -5. The time now is 11:42 AM.

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