Q: on setting paths

Q: on setting paths

Post by Ed Griff » Sun, 08 Oct 1995 04:00:00



(SunOS, tcsh)
In my .tcshrc I put

.
.
setenv PATH
/usr/ucb:/bin:/usr/bin:usr/local/bin:/home/egriffin:/home/egriffin/html
.
.
Doesn't work. Can't exec progs in those paths.
How do I set my paths?

Thank you -


 
 
 

Q: on setting paths

Post by Tad McClell » Wed, 11 Oct 1995 04:00:00


: (SunOS, tcsh)
: In my .tcshrc I put

: setenv PATH
: /usr/ucb:/bin:/usr/bin:usr/local/bin:/home/egriffin:/home/egriffin/html

: Doesn't work. Can't exec progs in those paths.
: How do I set my paths?

1) "Doesn't work" is not very descriptive. You'll get more help if you
   describe what happens:

     i) Command not found message
    ii) nothing happens, just returns to prompt
   iii) something else

what does 'echo $PATH' say?

2) the '.login' file is the usual place for setting paths. You would then
need to do something like:
#                                    v   note the line continuation char
set PATH = ( /bin /usr/bin /usr/5bin \
             /usr/ucb )

--
  Tad McClellan,      Logistics Specialist (IETMs and SGML guy)

  Interesting trivia: If you took all the sand in North Africa and spread
     it out... it would cover the Sahara desert.

 
 
 

1. set path = "$path" hoses path in tcsh -- why???

All:

  % echo $path
  /usr/local/bin /usr/pubsw/bin /usr/bin ...
  % ls
  [... etc ... it works]
  % set path = "$path"   *** What the hell happens here??? ***
  % echo $path
  /usr/local/bin /usr/pubsw/bin /usr/bin ... looks the same
  % ls
  ls: Command not found.

This is just a particularly egregious illustration of the problem. In
general, if I try to do something like this:

  % set savedPath = "$path"  # Save current path
  % set path = "$savedPath"  # Restore saved path

it doesn't work. The path *looks* the same, but the shell can't find
anything. Recall that the shell variable path and the environment
variable PATH are linked, so setting one automatically sets the other
also. Some unexpected feature of list interpolation perhaps? Bug or
feature, I call it a pain...

Andrew Duncan

2. KDE application command line switches?

3. need general help with setting paths & man paths for apps

4. adding headers to proxied requests

5. PATH set by "rsh localhost echo \$PATH"

6. Audio (mp3)/Video Player

7. trn: where do you set default newsfeed and other Qs

8. RadHat on a 386 w/ an ATAPI cdrom

9. Qs Redhat startup scripts for setting routes

10. Video Qs: setting more lines, rotating the display.

11. How does a chmod command affect login script path setting and any umask set?

12. add in the PATH a path if not present in the PATH

13. ksh: add path to $PATH only when ot yet in $PATH