Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <199909290257.VAA00641@mercury.xraylith.wisc.edu> To: JSONCRAIG AT aol DOT com cc: fortinj AT ibm DOT net, cygwin AT sourceware DOT cygnus DOT com Subject: error redirection for win9x command shell [Re: Ouptput question] In-Reply-To: Your message of "Tue, 28 Sep 1999 21:36:33 EDT." Date: Tue, 28 Sep 1999 21:57:31 -0500 From: Mumit Khan JSONCRAIG AT aol DOT com writes: > c++ -o foo.exe -g -v foo.cpp 2>&1 | tee out.txt > > the last two lines of output are this: > as -o C:\WINDOWS\TEMP\ccR9Mhgb.o C:\WINDOWS\TEMP\ccI0Figb.s > Bad command or file name > > The file &1 is created and out.txt is not. I'm using GCC-2.95 Mingw32, from > Mumits site. Any ideas? > I understand that NT CMD.EXE can redirect standard error as well, but Win9x COMMAND has no concept of a separate standard error and you need to use redir (see below). For NT CMD: C:\> gcc [ ... ] 2> err.log to just put the error messages in err.log. To redirect both the standard output and standard error: C:\> gcc [ ... ] > err.log 2>&1 I haven't tried this, so sorry if the syntax is not quite correct. For mingw32, I adapted DJ's redir; source/binary/doc available from ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/ports/redir.zip Regards, Mumit ps: I've changed the subject to help our friend the search engine. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com