The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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-09-2008 02:27 AM
Compile errors because of the ras.h file morrisey AIX 2 04-11-2008 12:54 PM
Compile .C file in Mac OS X 10.2 FerIX High Level Programming 2 10-31-2002 11:11 AM
compile xev on HPUX 10.20 - errors lan High Level Programming 1 05-16-2002 12:22 PM
help, what is the difference between core dump and panic dump? aileen UNIX for Dummies Questions & Answers 1 06-11-2001 08:08 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-22-2006
starstarting starstarting is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 3
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!!!
  #2 (permalink)  
Old 10-22-2006
BOFH BOFH is offline Forum Advisor  
Registered User
  
 

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 406
Code:
$ make > error.log 2>&1
Carl
  #3 (permalink)  
Old 10-22-2006
starstarting starstarting is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 3
Thanks a lot Carl!!
  #4 (permalink)  
Old 10-23-2006
napolayan napolayan is offline
Registered User
  
 

Join Date: Oct 2006
Location: Bangalore, India
Posts: 41
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-23-2006 at 02:03 AM..
  #5 (permalink)  
Old 10-23-2006
starstarting starstarting is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 3
Many thanks napolayan!!
  #6 (permalink)  
Old 10-23-2006
napolayan napolayan is offline
Registered User
  
 

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

Join Date: Feb 2005
Location: Broomfield, CO
Posts: 406
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
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 01:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0