Path: chuka.playstation.co.uk!tjs From: tjs@cs.monash.edu.au (Toby Sargeant) Newsgroups: scee.yaroze.programming.gnu_compiler Subject: Re: error file.. Date: 21 Jun 1998 06:54:35 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 13 Message-ID: References: <3589d5d3.3140602@news.playstation.co.uk> <358A1D67.2198500D@micronetics.com> NNTP-Posting-Host: indy16.cs.monash.edu.au X-Newsreader: slrn (0.9.5.1 UNIX) On Fri, 19 Jun 1998 09:12:23 +0100, Jim wrote: >gcc directs all errors to stderr. >Use >& to redirect stderr to stdout. > >gcc main.c > error.lst 2>&1 Is this NT/95 syntax? is it the same as gcc main.c 2>&1 > error.lst? If it isn't, then whoever wrote the NT/95 shell should be _shot_. Under sh (where this syntax came from), your example would redirect stdout to a file, and then redirect stderr to stdout (but not to the file). That's the way it should be. toby.