LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2005, 07:16 PM   #1
rmartine
Member
 
Registered: Dec 2002
Location: San Luis Obispo, CA
Distribution: Fedora Core 3
Posts: 618

Rep: Reputation: 30
Output redirection


I'm trying to get my make output goto and error_log. I've tried the following commands and it's not cooperating:

make -k all > error_log

make -k all 2>error_log

make -k all 1>error_log

What is going to the error_log are the the make commands. Ex. g++ -o -c "my_stupid_program"

Any help would be appreciated
 
Old 01-25-2005, 07:25 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
You could try
make -k all > error_log 2>&1
make -k all | tee error_log


Cheers,
Tink
 
Old 01-25-2005, 07:31 PM   #3
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Code:
(make -k all 2>&1) | tee error_log
Will push everthing to the error_log as well as scrolling it up the screen ( so you know whats going on. )

If you simply want to record the errors, and you don't want them echoed to the screen then.
Code:
make -k all 2> error_log
The only thing you seemed to be missing above was the space after >

If you want to still echo the errors, and record them to file do:
Code:
(make -k all 3>&1 1>&2 2>&3 ) | tee error_log
 
  


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
what is output redirection? LinuxPadawan General 5 05-18-2005 01:53 PM
Output & input redirection serotonincy Programming 3 04-12-2004 09:28 AM
Minor output redirection problem.. Tyir Linux - General 0 01-27-2004 10:13 PM
output redirection to another directory spyghost Linux - Software 3 09-21-2003 10:28 AM
Output redirection legtester Linux - General 4 07-07-2003 03:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:55 PM.

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
Open Source Consulting | Domain Registration