Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!mcvax!unido!iaoobelix!woerz From: woerz@iaoobelix.UUCP Newsgroups: comp.unix.questions Subject: Re: $PATH glitch? -- Gould Powernode - (nf) Message-ID: <8200018@iaoobelix.UUCP> Date: Tue, 28-Jul-87 16:14:00 EDT Article-I.D.: iaoobeli.8200018 Posted: Tue Jul 28 16:14:00 1987 Date-Received: Sun, 2-Aug-87 19:47:15 EDT References: <155@dsacng1.UUCP> Lines: 43 Nf-ID: #R:dsacng1:-15500:iaoobelix:8200018:000:1671 Nf-From: iaoobelix!woerz Jul 28 21:14:00 1987 > /***** iaoobelix:comp.unix.ques / dsacng1!naa1810 / 7:41 pm Jul 24, 1987*/ > I recently experienced what I consider an inconsistency with > my PATH variable. I had appended my bin directory path to the PATH > variable. I had an existing shell script named "de" in my bin > directory that simply executed the Unix date command. > ... > [some command deleted] > ... > Much to my amazement, 'dee' did not work--I received "Command not found" > from the system. > > I further experimented and found out that I could not execute a > new shell script that I created in my bin directory from any directory > path except when my cwd was my bin directory. > > I also noted that when I logged off and then back on, all my bin > shell scripts would properly execute from any cwd. > > If anyone can explain to me what is going on with my PATH variable, > I would greatly appreciate it. THANKS. > /* ---------- */ You should have told, if you use the Borne shell, the cshell or the Korn shell. I don't know about the Korn shell and am not sure about your version of the Bourne shell, but the cshell (at least on vanilla 4.2BSD) hashes all commands it finds on invocation. So if you create a new script or new program, you have to say "rehash" to force cshell to rescan all directories in your path, before the shell recognizes the command from everywhere. Hope this helpes ------------------------------------------------------------------------------ Dieter Woerz Fraunhofer Institut fuer Arbeitswirtschaft und Organisation Abt. 453 Holzgartenstrasse 17 D-7000 Stuttgart 1 W-Germany BITNET: iaoobel.uucp!woerz@unido.bitnet UUCP: ...{seismo!unido, pyramid}!iaoobel!woerz