I'm working on a project on my school's linux servers. I have a program deep in a directory, we'll say it's /afs/csic.umd.edu/class/cmsc311/0101/cs311xxx/class/cmsc311/0101/cs311xxx/datalab-handout/datalab-handout

What do I setenv the PATH variable to so that I can run the program in that directory? It is currently set to /usr/local/bin:/usr/bin:/bin so obviously I want to add to the end of that.

Thanks!

link|improve this question
feedback

1 Answer

up vote 4 down vote accepted

csh/tcsh you say?

setenv PATH ${PATH}:/my/additional/path

Update: Fixed my error of forgetting to escape the colon. Thanks Dennis.

link|improve this answer
I did so, specifically setenv PATH $PATH:/afs/csic.umd.edu/class/cmsc311/0101/cs311055/class/cmsc311/0101/cs311055/‌​datalab-handout/datalab-handout but I keep getting the error Bad : modifier in $ (/). – Rowhawn Sep 8 '10 at 2:54
2  
@Rowhawn: You need to escape the colon: setenv PATH $PATH\:/more/dirs or use braces around the variable: setenv PATH ${PATH}:/more/dirs – Dennis Williamson Sep 8 '10 at 3:10
Updated. Thanks Dennis. – Spiff Sep 8 '10 at 4:37
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.