Date: Tue, 8 Feb 2000 09:32:32 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Sherlock Campbell cc: djgpp AT delorie DOT com Subject: Re: shell scripts in DJGPP In-Reply-To: <389F23E1.F2C3AB13@mail.utexas.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk On Mon, 7 Feb 2000, Sherlock Campbell wrote: > So far, I have been able to compile it using DJGPP but I cannot > get the shell scripts to run. They all begin with '#!/bin/sh' and > bash.exe and sh.exe are in my PATH statements. If I run 'sh', then the > scripts are available, but from my regular DOS prompt it reads 'bad > command or file name' when I try to run the scripts. COMMAND.COM cannot run shell scripts. You need to run them like this: sh script or sh ./script Then it will work. You could also create a batch file for each script FOO, called FOO.bat, which would say this: @echo off sh %0 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. Note that you don't need all this tyrickery when the script is run by a DJGPP program, like by Make reading the Makefile, because the DJGPP library knows about shell scripts and will automatically invoke the shell, as if you prepended "sh". But COMMAND.COM is not a DJGPP program...