digitalmars.D.announce - Rederr - stdout/stderr redirector for Win32
- Stewart Gordon (29/29) Sep 12 2005 This is a small utility to redirect the standard output and error
This is a small utility to redirect the standard output and error streams, for those Windows versions that don't provide their own ways of doing it. At the moment it depends on two of my library modules, both of which are in the SDWF distribution. A typical use is rederr o=output.txt e=errors.txt program with a few variations - a '!' before the '=' forces overwriting the file, and a '+' in the same position appends. I spent ages exploring implementation strategies until I could get it to work, but it still has the odd limitation here and there: - if redirecting stdout and stderr to the same file, for some strange reason I get the whole stderr followed by the whole stdout - a workaround is to redirect the lot to stdout and then redirect that from the shell rederr e= program > output.txt - it seems to have trouble running stuff from the PATH (experiment with this a bit more) - error messages could still be polished a bit So Walter, your excuse for not liking stderr is now null and void! (NPI) Stewart. -- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/M d- s:- C++ a->--- UB P+ L E W++ N+++ o K- w++ O? M V? PS- PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y ------END GEEK CODE BLOCK------ My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Sep 12 2005