Article View: alt.linux
Article #299Re: howto move the errors from gcc to a file?
From: Naftali Salz
Date: Mon, 04 Jun 2001 07:41
Date: Mon, 04 Jun 2001 07:41
38 lines
2465 bytes
2465 bytes
if you use tcsh use gcc -o testprog.c | & less then you can scroll up and down the error list and when you are done simply press Q. On 26 May 2001, loki wrote: > David. E. Goble <goble@gtech> wrote unto us: > >Hi all; > > > >I am just beginning to try programming in linux (redhat). > > > >My problem is when I use gcc ...etc it produces a scolling list of > >errors. How can I move or pipe the errors to a file. ie something like > > > > gcc -o hello.c > error.txt? > > As a final tip to add to the others, sometimes it is nice to both view and > save the output of a program. The little utility 'tee' is handy for this. > You can use it like this: > > gcc -o testprog test.c 2>&1 | tee out.log > > The 'tee' program will save what it receives on standard input to the named > file, as well as printing it to the screen. This often gives you the best > of both worlds with regard to viewing and saving of errors. > > > -- > loki > eloki/at/dingoblue.net.au > > Dare I disturb the universe? You bet I do! :) > >
Technical Details
Message-ID:
<Pine.SGI.4.33.0106041040290.380689-100000@menix.bgu.ac.il>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!chcgil2-snh1.gtei.net!chcgil2-snf1.gtei.net!news.gtei.net!news.huji.ac.il!menix.bgu.ac.il!salzReferences:
<3b0d0a50.19718301@news.adelaide.on.net> <slrn9gucaj.c2k.eloki@hoop.dingoblue.net.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c696,4d862f9db31ad355 X-Google-Attributes: gid10c696,public X-Google-Thread: 100c5f,4d862f9db31ad355 X-Google-Attributes: gid100c5f,public X-Google-Thread: f9b51,4d862f9db31ad355 X-Google-Attributes: gidf9b51,public X-Google-Thread: 102983,4d862f9db31ad355 X-Google-Attributes: gid102983,public X-Google-ArrivalTime: 2001-06-04 00:51:13 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!chcgil2-snh1.gtei.net!chcgil2-snf1.gtei.net!news.gtei.net!news.huji.ac.il!menix.bgu.ac.il!salz From: Naftali Salz <salz@menix.bgu.ac.il> Newsgroups: alt.linux,aus.computers.linux,comp.os.linux.development.apps,comp.os.linux.setup Subject: Re: howto move the errors from gcc to a file? Date: Mon, 4 Jun 2001 10:41:30 +0300 Organization: The Hebrew University of Jerusalem Lines: 39 Message-ID: <Pine.SGI.4.33.0106041040290.380689-100000@menix.bgu.ac.il> References: <3b0d0a50.19718301@news.adelaide.on.net> <slrn9gucaj.c2k.eloki@hoop.dingoblue.net.au> NNTP-Posting-Host: menix.me.bgu.ac.il Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: news.huji.ac.il 991640493 21248 132.72.113.1 (4 Jun 2001 07:41:33 GMT) X-Complaints-To: abuse@news.huji.ac.il NNTP-Posting-Date: Mon, 4 Jun 2001 07:41:33 +0000 (UTC) In-Reply-To: <slrn9gucaj.c2k.eloki@hoop.dingoblue.net.au>