Redirect the stderr GCC stream to file, executing from Ms-Dosshell

Chris Faylor
Wed Oct 1 08:18:00 GMT 1997

In article <>,
Sergey Okhapkin  <> wrote:
>Chris Faylor wrote:
>> In article <>,
>> Giandomenico De Sanctis <> wrote:
>> >How to redirect the stderr stream to a file, running GCC from MS-Dos
>> >command prompt, and not from Unix-like shell as bash??
>> gcc whatever 2>wherever
>This works with NT4.0 cmd.exe only, but not with 95's

Right.  Sorry to have not mentioned that.

Other alternatives are:

1) Use 4DOS ( ), which allows '>&' for redirection.

2) Write a small program to redirect stderr to stdout and run its

3) bash -c 'exec gcc whatever 2>wherever'
--			"Strange how unreal
VMS=>UNIX Solutions	Boston Business Computing	 the real can be."
For help on using this list (especially unsubscribing), send a message to
"" with one line of text: "help".

More information about the Cygwin mailing list