Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <00e901c246f8$4e5a4e10$0100a8c0@wdg.uk.ibm.com>
From: "Max Bowsher" <maxb@ukf.net>
To: "Abhijit Patait" <abhijit_patait@yahoo.com>, <cygwin@cygwin.com>
References: <20020818204058.4357.qmail@web9401.mail.yahoo.com>
Subject: Re: "bash: hello: Command not found" error for hello.exe in present directory
Date: Sun, 18 Aug 2002 21:46:13 +0100
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

Abhijit Patait wrote:
> I recently installed cygwin on my Windows XP machine.
> I wrote a simple "hello world" program and compiled
> and linked it using gcc to create an executable named
> "hello.exe" in a directory, named ~/hello/. However,
> when I type "hello.exe" on the command line (in the
> directory ~/hello/), I get a "bash: hello: command not
> found" error. I have verified that the file hello.exe
> exists in that directory.
> 
> A workaround is that I have to issue a command
> "./hello" and then it works. Another workaround is
> that I append "./" to my path in the .bashrc file in
> my home directory and then it works too. Could someone
> shed light on what's going on? Why is the shell not
> able to look for the command in the present directory
> first?
> 
> Thanks in advance for your help.

This is standard unix shell behaviour.

Max.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

