Mail Archives: djgpp/1997/06/07/02:38:08
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 -