Date: Thu, 12 May 1994 14:01:13 -0400 (EDT) From: Chris Tate To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: piping errors and warnings under DOS Jan Reimers wrote: > > Can anyone out there tell me how to redirect my warning and error > messages to a file under DOS. For example: > > gcc -Wall -c prog.cc >error.lst > > definitly dosn't work, everything stills ends up going to the screen. > The DOS redirection only traps characters sent to 'standard out' but > not 'standard error'. The djgpp documentation specificaly states that > the compiler sends all error messages to 'standard error'. Use 4DOS. 4DOS is a shareware (ASP, in fact) *replacement* for the MS-DOS and DR-DOS command interpreters, that provides a *lot* of additional features. One of those features is the ability to pipe standard error much as Unix allows you to. In your previous example, what you'd do is gcc -Wall -c prog.cc >& error.lst ">&" means "pipe stdout *and* stderr to a file". 4DOS does a *whole* lot more than this, though; IMHO it's the best piece of shareware ever written. You can get hold of it from the usual SIMTEL archives, in the U.S. at least; I'm not sure what it's European mirrors are. My favorite U.S. site is oak.oakland.edu, in the /pub/msdos/4dos directory. Good luck! -- Chris Tate fixer AT faxcsl DOT dcrt DOT nih DOT gov