delorie.com/archives/browse.cgi | search |
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: | <3D600891.2000501@attbi.com> |
Date: | Sun, 18 Aug 2002 15:50:25 -0500 |
From: | "Cyber.Zombie" <Cyber DOT Zombie AT attbi DOT com> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020721 |
X-Accept-Language: | en-us, en |
MIME-Version: | 1.0 |
To: | Abhijit Patait <abhijit_patait AT yahoo DOT com> |
CC: | cygwin AT cygwin DOT com |
Subject: | Re: "bash: hello: Command not found" error for hello.exe in present |
directory | |
References: | <20020818204058 DOT 4357 DOT qmail AT web9401 DOT mail DOT yahoo DOT com> |
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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |