Mail Archives: djgpp/1997/11/09/06:18:50
On Fri, 7 Nov 1997, Cesar Scarpini Rabak wrote:
> Do you folks can devise a simple method to check if the script is being run
> from COMMAND.COM or spawned from a djgpp program?
Two things come to mind:
1) If DJDIR is defined in the environment, you are under DJGPP
(but it could also be that COMMAND.COM was invoked, as in
shelling to DOS, before actually running the script).
2) You could test for " !proxy" in the environment (with the
leading blank!), but this will only be put there if the command
line is longer than 126 characters.
Neither of these is fool-proof, of course.
- Raw text -