delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/22/08:44:59

Date: Wed, 22 Jan 1997 07:50:58 -0500 (EST)
From: "Mike A. Harris" <mharris AT sympatico DOT ca>
Reply-To: "Mike A. Harris" <mharris AT sympatico DOT ca>
To: Daniel P Hudson <afn03257 AT freenet3 DOT afn DOT org>
cc: djgpp AT delorie DOT com
Subject: Re: About redirection...
In-Reply-To: <5c3qnp$qmi@huron.eel.ufl.edu>
Message-ID: <Pine.LNX.3.95.970122073628.141P-100000@capslock.com>
Organization: Your mom.
MIME-Version: 1.0

On 22 Jan 1997, Daniel P Hudson wrote:

> >>> How do I direct the errors/warnings that are created after compile,
> >>> to a file?  I tried REDIR, but didn't have a clue on how to use it.
> >>> Since my HD space is limited, I got rid of the DOCs.
> >>redir -o err -eo gxx -o tb.exe tb.cpp window.cpp -lgrx20
> >>This redirects both stdout and stderr to the file called "err".  redir
> >>has a bunch of similar options; just type "redir" to see them.
> 
> >Sorry men, but I think using redir isn't too comfortable (but it's a
> >working solution, of couse), and using DOS-port of BASH is easy only
> >for persons with previous experiense in UNIX ( not my case :~(  )
> >Probably the best solution is to rewrite startup code in such a way,
> >that it will:
No, I wouldn't waste any time writing any code at all.  See below.

> I think rewritting you own simple command interpreter OR
> getting something like 4DOS is the easiest solution.
Why bother writing a command interpreter?  It would take quite some
time to even achieve shitty COMMAND.COM functionality.  Your
suggestion of getting 4DOS is the best.

How ANY DOS programmer could get by without 4DOS is totally BEYOND me!
It does WAY too many cool things.  The time you take to download it is
given back to you by the time you save not having to type filenames
anymore.  I'm refering to the filename completion features of course.
 
4DOS is only around a 600k zip file. ftp://ftp.std.com/vendors/jpsoft
The FULL manual is also available as jp4ref.zip or something similar.
It is identical to the printed manual in every way except that it is a
text file.  (I know, I registered it.)

It is also totally functional and completely uncrippled.  The only
difference between the registered and shareware versions is that the
shareware version gives a frienly beep at startup. (dee-doot).  It
kinda adds personality to it IMO.

4DOS redirection choices include: (taken from 4DOS online help F1)


Here are the redirection options supported by 4DOS:
	< filename     To get input from a file or device instead of
                       from the keyboard
	> filename     To redirect standard output to a file or device
	>& filename    To redirect standard output and standard error to a
                       file or device
	>&> filename   To redirect standard error only to a file or
                       device      

Also, you can pipe output into the "tee" program which works just like
it's unix counterpart.

You can also use a pipe on the stderr.

ie:

foobar.exe |& widget.exe 

This pipes the stderr AND stdout of foobar to the stdin of widget.

Cool eh?

Oh, there is much much more!

Do yourself a favour and download 4DOS today!  This goes for EVERYONE!



Mike A. Harris  -  Computer Consultant   http://www3.sympatico.ca/mharris
My dynamic address:      http://www3.sympatico.ca/mharris/ip-address.html
mailto:mharris AT sympatico DOT ca        mailto:mharris AT blackwidow DOT saultc DOT on DOT ca

OpenDOS: The NEW DOS with FREE source code! http://www.caldera.com

- Raw text -


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