Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/15/85; site greipa.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!bellcore!decvax!decwrl!greipa!jordan From: jordan@greipa.UUCP (Jordan K. Hubbard) Newsgroups: net.unix Subject: Re: $path vs $PATH Message-ID: <229@greipa.UUCP> Date: Thu, 6-Jun-85 13:33:33 EDT Article-I.D.: greipa.229 Posted: Thu Jun 6 13:33:33 1985 Date-Received: Thu, 20-Jun-85 23:57:22 EDT References: <347@tekred.UUCP> <183@luke.UUCP> Reply-To: jordan@greipa.UUCP (Jordan K. Hubbard) Organization: Genstar Rental Electronics, Palo Alto, Ca. Lines: 38 In article <183@luke.UUCP> sml@luke.UUCP (Steven List @ Uncle Bene's Farm) writes: >> Okay, UNIX gurus, can somebody tell me about the differences >> (in csh) between the shell variable $path and the environment >> variable $PATH ??? > >PATH sets the directory search path for the bourne shell. >path sets the directory search path for the C shell. > >To check it out, > > in the bourne shell, type PATH=""; export path > then try to execute anything > in the C shell, type unset path > then try to execute anything > then reverse them Uh, Steve, you've forgotten one thing.. In the bourne shell, the path variable is called PATH. That is true. There's also a very significant 'path' variable in csh. Also true. But if you'll re-read the question, I think you'll see that his question was why there were TWO path variables in csh. PATH and path.. Well, 'PATH' is set when 'path' is in csh (someone pointed that out I belive) and vice-versa (yes, setenv'ing PATH will set path) Why? Well, there are certain cases where user programs will want to do a getenv on 'PATH' to search for programs (like the 'which' command). Also, the execlp and execvp calls need to look at it. -- Jordan K. Hubbard @ Genstar Rental Electronics. Palo Alto, CA. {pesnta, decwrl, dual, pyramid}!greipa!jordan "Ack ack!". - William the feline