This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC Output


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]