delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/26/01:45:22

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3F73D24C.A6F8E92@dessent.net>
Date: Thu, 25 Sep 2003 22:44:44 -0700
From: Brian Dessent <brian AT dessent DOT net>
Organization: My own little world...
X-Accept-Language: en,en-US
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Error while running a .exe file in bash
References: <20030926052107 DOT 62405 DOT qmail AT web9802 DOT mail DOT yahoo DOT com>
Note-from-DJ: This may be spam

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.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019