Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!ncrlnk!ncrcae!hubcap!gatech!ncar!ames!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.questions Subject: Re: ????? HELP!!! what is wrong with this code? ??????? Message-ID: <8681@smoke.ARPA> Date: 13 Oct 88 09:03:42 GMT Article-I.D.: smoke.8681 References: <456@mrsvr.UUCP> <8271@alice.UUCP> <561@micropen> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 18 In article <561@micropen> steve@micropen (Steven J. Owens) writes: > I always thought UNIX checked in the directory you are in first > for the binary, then if it couldn't find it there, it checked > the $PATH. No -- the UNIX shell uses the specified pathname as is when it contains a slash (/); otherwise it searches the directories specified as :-delimited fields in the value of environment variable PATH, in order. If the current directory is not in PATH, it will not be searched. The two most usual ways to specify the current directory in PATH are "." and "" (empty string). Some older shells will not interpret a final empty string in PATH as the current directory, even though they are supposed to (it's a bug, not a feature). To deliberately run something from the current directory, you should type ./command, which is independent of PATH. (It is not wise to have the current directory early in the PATH directory list.)