![]() |
| | #1 |
| Registered User Join Date: Jun 2002
Posts: 12
| for example prog A spits its output to a file AA prog B spits its output to a file BB and spits out an error message on the screen... SO: if [ cmp AA solution_file ]; and if correct, i.e. no stderr screen-print I can handle it easily, that is I consider it CORRECT...but if [ cmp BB solution_file ]; I need to distinguish somehow that this comparison of files is in fact (physically) correct but it additionally generates a stderr message (that I need to hide from the screen) and I need to handle this BB as WRONG How do I redirect stderr, and how can I check for it? Any help is greatly appreciated... Thank you HOWY |
| HOWY is offline | |
| | #2 |
| Registered User Join Date: Jun 2002
Posts: 107
| For example, when I start my X server, I redirect the messages and error messages to a file called ~/xauth/xlog: startx >~/xauth/xlog 2>&1 & 2> redirects from error stream &1 means the last mentioned place to output. |
| raimo is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| fprintf to stderr crash programs | jlai | Windows Programming | 2 | 04-12-2005 08:51 AM |
| Question about pointers #2 | maxhavoc | C++ Programming | 28 | 06-21-2004 12:52 PM |
| Question... | TechWins | A Brief History of Cprogramming.com | 16 | 07-28-2003 09:47 PM |
| opengl DC question | SAMSAM | Game Programming | 6 | 02-26-2003 09:22 PM |
| Question, question! | oskilian | A Brief History of Cprogramming.com | 5 | 12-24-2001 01:47 AM |