This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Output
- From: Tim Prince <tprince at computer dot org>
- To: mckennad at esatclear dot ie
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 18 Jan 2002 08:02:21 -0800
- Subject: Re: GCC Output
- References: <3c47ee02.6b5b.0@esatclear.ie>
David Mc Kenna wrote:
> Just a quick question about redirecting the errors produced by gcc.
>
> If I type "gcc -o test.out test.c" and get a list of errors on screen, how do
> I redirect this output to a file. I have tried the standard method of "gcc -o
> test.out test.c > error.out" but this foes not work.
>
The standard method, if you don't remember something about your OS, is to look it up:
%info bash
....
Redirections
============
.....
For example,
the command
ls > DIRLIST 2>&1
directs both standard output (file descriptor 1) and standard error
(file descriptor 2) to the file DIRLIST,
--
Tim Prince
tprince@computer.org