Date: Tue, 21 Jan 1997 10:20:58 +0200 (IST) From: Eli Zaretskii To: Adrian Oboroc cc: djgpp AT delorie DOT com Subject: Re: About redirection... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 21 Jan 1997, Adrian Oboroc wrote: > Sorry men, but I think using redir isn't too comfortable Please explain what isn't too comfortable with `redir'. Btw, the DJGPP FAQ list suggests alternative methods for capturing screen output (see section 6.12 of the FAQ). Did you try any of them? > A) pre-check command line parameters, and pass to main program only > part before ">", ">&" and "<" combinations > B) perform the redirection of output from stdout (and stderr for ">&") > to a file, mentioned after ">" or ">&" operation. > C) check for "<" sign and redirect file after this symbol to stdin. This won't work. The < and > characters are special to COMMAND.COM, it attempts to parse them when it sees them on the command line and will most probably be totally confused when it sees >& or some such, and not invoke the program at all. In any way, these characters are NOT passed to the program, so our startup code doesn't even see them. > thinking about this topic? At least it will be more natural, then > "someprog.exe /? > info.txt" to get short instructions in text file That actually works, at least with programs whose design is consistent. For example, all GNU utilities print their short help screens to stdout, so you can redirect as above. If any programs compiled with DJGPP don't, then this is something you should complain to the author(s) of those programs.