delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/08/21:12:10

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Redirecting stderr
Date: Tue, 08 Apr 1997 05:26:58 -0700
Organization: Two pounds of chaos and a pinch of salt
Message-ID: <334A3992.7BEE@cs.com>
References: <334A7C08 DOT 3AEF AT cssa DOT org DOT za>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp205.cs.com
Mime-Version: 1.0
Lines: 29
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

The Almighty Cheese wrote:
> 
> Does *anybody* have a program that will spawn another program, capture
> its stderr and them do something with it? It is really difficult to get
> the compiler bugs out when they go on to two pages and you can only see
> the second page, especially since the second page errors are often
> meaningless and caused by the errors higher up.

<gratuitous humor at user's expense>
Let's all sing along:  o/ Read the ****ing manual / Read the ****ing
manual / Tra la la la la la... o/
</gratuitous humor>

The DJGPP distribution comes with a program called 'redir' that does
exactly what you describe.  Type 'redir' without arguments for the full
syntax to use.  The FAQ also describes 'redir' in chapter 6.10:  "How to
redirect GCC messages to a file."  Basically, here's what to do:

  redir -o err.log -eo gcc ...

The above redirects both stdout and stderr to the file 'err.log'.

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I      |   mailto:fighteer AT cs DOT com   |
| God's final message to His Creation: | http://www.cs.com/fighteer |
| "We apologize for the inconvenience."| Fight against proprietary  |
|                      - Douglas Adams | software - support the FSF!|
---------------------------------------------------------------------

- Raw text -


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