Mail Archives: djgpp/1999/08/01/17:17:17
On Fri, 30 Jul 1999, Michael Stewart wrote:
> Eli Zaretskii wrote in message ...
> >An excercise that is left to the interested reader: why did I say
> >"command.com" and not simply "command"?
>
> `command' on its own could execute command.bat or command.com if they are in
> the current directory. `command.com' will execute the command processor.
This is correct, but I don't expect anybody in their right mind to
have command.bat. On the same token, it's possible that someone has
command.com that isn't really a command processor, so command.com will
also fail.
No, the reason I used command.com was more practical (it actually
happened to some people). Recall that `system' invokes the shell if
the name of that shell (as defined by SHELL or COMSPEC in the
environment) seems to be of a Unix-style shell, like Bash. Well, it
just happens that Bash has a built-in command named `command', which
will cause some really weird errors if you pass it a DOS command or
batch file name...
- Raw text -