From: utzoo!decvax!yale-com!brunix!mjb Newsgroups: net.unix-wizards Title: Re: help on $cdpath Article-I.D.: brunix.1146 Posted: Wed Dec 22 15:53:52 1982 Received: Thu Dec 23 03:54:32 1982 References: sdcsla.180 You are trying to access a variable *local* to the login shell, which is not recommended. If you insist on doing it, make sure the cdpath setting is done in the .cshrc, then replace the "echo..." in the popen() call with: "csh -c 'echo $cdpath'". Note that this is *slow*. You might consider setting an environment variable--by convention do: setenv CDPATH "$cdpath" then the following would work: char *cdpath, *getenv(); if ((cdpath = getenv("CDPATH")) == NULL) { printf("Undefined\n"); exit(1); } printf("cdpath = %s\n",cdpath); exit(0); \mike braca {vax135,decvax}!brunix!mjb [Note: I am submitting this to the net because of the trouble we have been having getting mail through 'harpo']