delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/07/02:38:08

From: "Chris A. Triebel" <cat AT sun4 DOT iol DOT unh DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: newbie question
Date: Fri, 6 Jun 1997 09:18:46 -0400
Organization: University of New Hampshire - Durham, NH
Lines: 39
Message-ID: <Pine.SUN.3.91.970606091630.19283I-100000@sun4.iol.unh.edu>
References: <5n55td$6s1$1 AT morgoth DOT sfu DOT ca> <33967568 DOT 86D22F4A AT alumnos DOT inf-cr DOT uclm DOT es>
NNTP-Posting-Host: sun4.iol.unh.edu
Mime-Version: 1.0
In-Reply-To: <33967568.86D22F4A@alumnos.inf-cr.uclm.es>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

COMMAND.COM can't redirect standard error.  Use the redir.exe provided 
with your distribution.

redir -eo gcc -c prog.c |more

That will work.  redir.exe has many more options, but that is the one I 
usually use which redirects standard error into the standard out.

cat


On Thu, 5 Jun 1997, Roberto Henriquez Laurent wrote:

> Date: Thu, 05 JUN 1997 10:14:32 +0200 
> From: Roberto Henriquez Laurent <shl24634 AT alumnos DOT inf-cr DOT uclm DOT es>
> Newgroups: comp.os.msdos.djgpp
> Subject: Re: newbie question 
> 
> Wilson Wang Shun Leung wrote:
> 
> > This is a newbie question.  Sorry if it is too trivial.
> > How to capture error/warning message from command line
> > (in DOS)?  I tried :
> >    gcc -c prog.c | more
> >
> > But the piping doesn't work.
> >
> > or
> >    gcc -c prog.c > err
> 
>     You need to redirect *standard error* instead of standard output. I
> don't know if COMMAND.COM is able to do that. I use 4DOS & NDOS, which
> can. (However I don't remember the exact syntax now...)
> 
> > But the err file is empty
> >
> > Any idea?
> >
> > Thanks

- Raw text -


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