Mail Archives: djgpp/1999/02/09/09:35:02
David Allsopp <daa AT tqSPAMbase DOT demon DOT co DOT uk> writes:
> Fine, compiled first time even :-). However, it only runs under an MS-
> DOS command.com window (W95).
>
> I have the GNU Unix utilities (grep, sed, awk, etc.), and generally work
> in a "bash" window. If I try to run the program from bash, nothing
> happens. I made the simple change of opening a file and writing a
> string out to that, in case there are stdout/stderr problems, but the
> program just seems to do nothing: no file is created. Again, if I run
> this from command.com, the file is created OK.
Maybe you did not run it correctly. You can run programs from current
directory even if you don't have current directory in the PATH, for
example
bash> ./test
will run program `test' (maybe with .exe, .bat or whatever) from
current directory. On the other hand, if you do just
bash> test
it will run bash's built-in `test' command which will say nothing.
You can place current directory on the PATH, like this
bash> export PATH=$PATH:.
but, IMHO, it is better to use `./' to make it clear which program you
want to run (also, for true Unix accounts there are security reasons
not to put current directory in the PATH).
HTH,
--
Michael Bukin
- Raw text -