delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/09/29/00:06:27

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <37F1900C.58A227A3@ihug.co.nz>
Date: Wed, 29 Sep 1999 17:05:32 +1300
From: Ross Smith <ross DOT s AT ihug DOT co DOT nz>
Organization: The Internet Group
X-Mailer: Mozilla 4.6 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: Ouptput question
References: <b5390d85 DOT 2522c721 AT aol DOT com>

JSONCRAIG AT aol DOT com wrote:
> 
> 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?

Are you running this from a Bash shell, a Windows 95/98 command line, or
a Windows NT/2000 command line?

In a Bash shell, you redirect both stdout and stderr to the same file
with &>file.

In an NT shell, you can't redirect them both to the same file, but you
can send them to two separate files with >file1 2>file2. (Using the same
filename for both doesn't work.)

In a Win9x shell, you can't redirect stderr at all.

--
Ross Smith <ross DOT s AT ihug DOT co DOT nz> The Internet Group, Auckland, New Zealand
========================================================================
  "There are many technical details that make Linux attractive to the
  sort of people to whom technical details are attractive."   -- Suck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019