Subject: Re: Ouptput question
From: Ross Smith <[email-masked]>
To: [email-masked]
Date: Wed, 29 Sep 1999 17:05:32 +1300

[email-masked] 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 <[email-masked]> 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 [email-masked]