delorie.com/archives/browse.cgi | search |
From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: shell scripts in DJGPP |
Date: | Wed, 9 Feb 2000 09:01:21 +0200 |
Organization: | NetVision Israel |
Lines: | 26 |
Message-ID: | <Pine.SUN.3.91.1000209090102.9816G-100000@is> |
References: | <Pine DOT SUN DOT 3 DOT 91 DOT 1000208093202 DOT 28790G-100000 AT is> <87pes3$2l8$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> |
NNTP-Posting-Host: | is.elta.co.il |
Mime-Version: | 1.0 |
X-Trace: | news.netvision.net.il 950079870 13174 199.203.121.2 (9 Feb 2000 07:04:30 GMT) |
X-Complaints-To: | abuse AT netvision DOT net DOT il |
NNTP-Posting-Date: | 9 Feb 2000 07:04:30 GMT |
X-Sender: | eliz AT is |
In-Reply-To: | <87pes3$2l8$1@nets3.rz.RWTH-Aachen.DE> |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Errors-To: | dj-admin AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On 8 Feb 2000, Hans-Bernhard Broeker wrote: > > However, there's a caveat: you cannot redirect standard streams of a > > batch file, so if you go this way, you lose the ability to redirect > > the script's I/O, which might be important for some scripts. > > If you want, there's a remedy for that, as well: *Compile* the batch > files to .com files, using PC Magazines 'Bat2exec'. It strikes me that it would be much simpler to use `redir', like this: redir script or redir -o file script (`redir', being a DJGPP program, will know how to invoke a shell script.) > Remarkably enough, those compiled batch files do support > redirection, unlike the originals. That's not surprising: the problems with redirection from a batch file are a misfeature of COMMAND.COM, caused by the fact that it doesn't spawn another copy of itself to run the batch. Compiled batch files, OTOH, are normal .com programs, so redirection works as usual.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |