How to disable console output
I would like to disable console output. For example when I do:
system("ls -d ~/dirname > logfile.log"); to determine is a folder exists, if it doesn't the text "folder does not exist" is outputted into the console which is really annoying when writing curses progarms. How can I get it to stop? |
What you're redirecting in your shell command there, is just the stdout (file descriptor 1). You need to either specify &>logfile.log, for example, or 2>/dev/null and > logfile.log to junk the stderr (file descriptor 2).
|
ah! thank you very mich :) a nice, quick, simple fix.
|
All times are GMT -5. The time now is 03:05 AM. |