Date: Tue, 21 Sep 1999 14:52:34 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Horst Kraemer cc: djgpp AT delorie DOT com Subject: Re: How to redirect? In-Reply-To: <37e0bebc.38635490@news.snafu.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 16 Sep 1999, Horst Kraemer wrote: > exec(getenv('COMSPEC'), '/c c:\g32\bin\ls.exe -l y > log'); This implicitly assumes that COMSPEC points to COMMAND.COM or its close work-alike. While mostly true, this assumption might be false in some rare cases (e.g., there are DJGPP users who put SHELL=-bash.exe in their CONFIG.SYS). If the shell doesn't know about the /c switch, the above will fail.