Subject: Re: cygwin b20 bash path usage?
From: [email-masked] (Earnie Boyd)

11 Nov 1998 18:49:48 -0800
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
To: William D Kirby <[email-masked]>, [email-masked]

---William D Kirby <[email-masked]> 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--------------
--          [email-masked]          --
-- 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
"[email-masked]" with one line of text: "help".