LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-05-2002, 01:47 PM   #1
alexzander
LQ Newbie
 
Registered: Feb 2002
Posts: 17

Rep: Reputation: 0
How to write output...


Hello,

I have a question, how to write information about errors from gcc compiler to a file?

Regards
Zander
 
Old 12-05-2002, 01:48 PM   #2
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Debian + Ubuntu
Posts: 4,358

Rep: Reputation: 57
Have you tried the > symbol? Eg... somecommand > outfile.txt
 
Old 12-05-2002, 01:52 PM   #3
alexzander
LQ Newbie
 
Registered: Feb 2002
Posts: 17

Original Poster
Rep: Reputation: 0
Yes, I tryed to redirect std output using > but it doesn't help.

gcc -c blablabla > smth, all info prinring on screen and nothing goes to file
 
Old 12-05-2002, 02:41 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,354
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
To grab both, redir stderr (chan 2) to stdout (chan 1) "gcc args 2>&1 > error.log" or for jst stderr: "gcc args 2> error.log"
 
Old 12-05-2002, 02:47 PM   #5
alexzander
LQ Newbie
 
Registered: Feb 2002
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks a lot
 
  


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
aplay: pcm_write:1029: write error: Input/output error mimithebrain Linux - Software 2 12-04-2007 11:51 AM
series-Write a single shell command to display the following output ricki Programming 2 07-31-2005 03:53 PM
Via AC'97 5.1 Optical Output or Audigy 4.1 Output Nza Fedora 3 06-01-2004 07:49 AM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 07:17 PM
Exercise 1-9. Write a program to copy its input to its output, replacing each string zombi3 Programming 3 12-21-2003 02:28 AM

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

All times are GMT -5. The time now is 11:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration