This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Ouptput question


JSONCRAIG@aol.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.s@ihug.co.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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]