The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Not able to compile Pro*c file due - give errors and points to /usr/include/.. file shafi2all High Level Programming 0 05-08-2008 11:27 PM
Compile errors because of the ras.h file morrisey AIX 2 04-11-2008 09:54 AM
Compile .C file in Mac OS X 10.2 FerIX High Level Programming 2 10-31-2002 07:11 AM
compile xev on HPUX 10.20 - errors lan High Level Programming 1 05-16-2002 09:22 AM
help, what is the difference between core dump and panic dump? aileen UNIX for Dummies Questions & Answers 1 06-11-2001 05:08 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-22-2006
Registered User
 

Join Date: Oct 2006
Posts: 3
Stumble this Post!
Unhappy Compile and dump errors to a text file

Hi there,

I want to compile a program and dump errors to a text file. How could I do so..?

Thanks for reading and thanks in advance!!!
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-22-2006
Registered User
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 395
Stumble this Post!
Code:
$ make > error.log 2>&1
Carl
Reply With Quote
  #3 (permalink)  
Old 10-22-2006
Registered User
 

Join Date: Oct 2006
Posts: 3
Stumble this Post!
Thanks a lot Carl!!
Reply With Quote
  #4 (permalink)  
Old 10-22-2006
Registered User
 

Join Date: Oct 2006
Location: Bangalore, India
Posts: 41
Stumble this Post!
BOFH,
if he just wants to compile the errors, wont 'filename 2> errorlog' work? why do we need to use make command? plz explain

Last edited by napolayan; 10-22-2006 at 11:03 PM.
Reply With Quote
  #5 (permalink)  
Old 10-22-2006
Registered User
 

Join Date: Oct 2006
Posts: 3
Stumble this Post!
Many thanks napolayan!!
Reply With Quote
  #6 (permalink)  
Old 10-22-2006
Registered User
 

Join Date: Oct 2006
Location: Bangalore, India
Posts: 41
Stumble this Post!
Quote:
Originally Posted by starstarting
Many thanks napolayan!!
oops! i edited my reply... so plz reply to this
Reply With Quote
  #7 (permalink)  
Old 10-23-2006
Registered User
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 395
Stumble this Post!
Quote:
Originally Posted by napolayan
BOFH,
if he just wants to compile the errors, wont 'filename 2> errorlog' work? why do we need to use make command? plz explain
As a programmer, I use makefiles to manage all my programs. Since he didn't specify, I used "make" in my example.

As to output, since we don't know for sure what program he's using and which error output he wants to see, redirecting all output to the error file could be productive (warnings are errors after all ). But for any output that's going to just STDERR then yea, your line would work.

Carl
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:11 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0