Error while running a .exe file in bash

Brian Dessent
Fri Sep 26 06:21:00 GMT 2003

Kishen Bahudhanam wrote:
> Thanks to everyone who contributed to this issue. The
> problem is resolved if I use: ./tx.exe.
> I still don't understand the error message though.
> If bash is not able to find the program, then filename
> completion shouldn't work, isn't it? For example if I
> just type:
>     >. t
> bash completes the file name to tx.exe (this is the
> only executable in the current directory starting with
> t).
> To make it actually run, I need to type:
>    >./tx.exe

Typing ". file" at a bash prompt means "read the file and execute the
commands stored within", which means bash will open the file and try to
execute its contents as if you'd typed them at the prompt.  That is NOT
what you want for an .EXE file, it only works for shell scripts.  To run
a normal executable you just give its name and bash runs it.  In the
case of an executable in the current directory, this is normally not in
the path and so you need to specify "./file" to tell bash to look in the
current directory which is ".".  Those are two completely different uses
of "." though.


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list