This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cygwin b20 bash path usage?


---William D Kirby <wdkirby@ix.netcom.com> wrote:
>
> I made the mistake of creating and trying to use an exectable named
> test.exe. under bash v2.02 in the cygwin beta 20 package. Nothing
> happened when it executed. I suspect that bash was executing the
program
> test.exe in the cygwin-b20\bin directory rather my test.exe in the
> directory I was using.

No.  test is a shell builtin command.  To execute your test.exe
specify the path, e.g.: ./test


> 
> Is this proper behavior in bash? I assumed the directory being
worked in
> was searched first then along the PATH directory list.
> 

No.  The current working directory is only searched if you contain a .
(period character) in the PATH variable list.  If you want it to be
searched first then you'll need to place it first in the PATH; but,
this isn't good security practices.

However, in the case of shell builtins such as test, it won't search
the path as it will be resolved by the builtin command.  There are
ways to have bash ignore the builtin command but I'll let you read the
bash.info file for that or type help at the bash command line.

You can determine where the command is being executed by doing `type
<command>' which will display where the command is being executed
from.  `type -a <command>' will display all of the possibilities for
that command.

==
-                  \\||//
-------------o0O0--Earnie--0O0o--------------
--          earnie_boyd@yahoo.com          --
-- http://www.freeyellow.com/members5/gw32 --
----------------ooo0O--O0ooo-----------------

PS: Newbie's, you should visit my page.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]