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
Date: Sun, 18 Aug 2002 17:46:21 -0400
From: Jon LaBadie <jcyg@jgcomp.com>
To: cygwin@cygwin.com
Subject: Re: "bash: hello: Command not found" error for hello.exe in present directory
Message-ID: <20020818214621.GA24370@butch.jgcomp.com>
Mail-Followup-To: Jon LaBadie <jcyg@jgcomp.com>, cygwin@cygwin.com
References: <20020818210413.41127.qmail@web9402.mail.yahoo.com> <001b01c246fb$7cbe3110$4f4afea9@sknet01>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <001b01c246fb$7cbe3110$4f4afea9@sknet01>
User-Agent: Mutt/1.3.28i

On Sun, Aug 18, 2002 at 10:09:01PM +0100, Terry Flannery wrote:
> Your windows 2000 machine has . in your path then, which is not done by
> default.
> 
> Terry
> 
> ----- Original Message -----
> From: "Abhijit Patait" <abhijit_patait@yahoo.com>
> To: <cygwin@cygwin.com>
> Sent: Sunday, August 18, 2002 10:04 PM
> Subject: Re: "bash: hello: Command not found" error for hello.exe in present
> directory
> 
> 
> > This, however, does not happen on the cygwin bash
> > shell installed on my Windows 2000 machine (I did not
> > do anything special there). That's why I am confused!!
> >
> > Abhijit
> >
> >
> >
> >
> >
> > Because unlike DOS and NT command shells, bash et.al.
> > do NOT look for any executables in the current
> > directory unless explicitly told to do so (by
> > prepending './' to the command or adding '.' to the
> > PATH).
> >
> >
> >
> > 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.
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > HotJobs - Search Thousands of New Jobs
> > http://www.hotjobs.com
> >
> > --
> > 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/
> >
> 
> 
> --
> 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/
> 

Or PATH starts with ":" which is an implied ".:".

-- 
Jon H. LaBadie                  jcyg@jgcomp.com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

--
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/

