Mail Archives: djgpp/2000/02/08/08:27:46
Sherlock Campbell <scampbell AT mail DOT utexas DOT edu> wrote:
> I am new to DJGPP (and Unix, for that matter) and have run into a
> problem.
> I have a c program that I need to compile and run on a Win98 desktop.
> It is a fairly complex program with several makefiles and lots of
> executables. I set it up and compiled it successfully on a Solaris Unix
> system. 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.
Exactly. 'command.com' and/or DOS know nothing about the #! method of
specifying that a given file is a script for some specified utility.
So you cannot expect shell scripts to be directly executable, from
command.com.
Remedies:
1) Use 'bash' as your shell (at least for the time of working with that
package the shell scripts belong to)
2) Start them with an explicit call of 'sh', like
sh /path/to/script arguments...
or, if they're on the PATH:
sh -c script arguments...
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -