How to setenv on tcsh?

dlarmour

Registered
Hi

I want to add to my PATH. I tried

setenv PATH=$PATH:/usr/bin

It tells me there is a "bad modifier (/). Can someone help?

Thanx

David
 

quiksan

awesomer...
Viro said:
Get rid of the = symbol like so

setenv PATH $PATH:/usr/bin

i tried this as you stated, and got the same error as above.
 

naodx

Registered
When I was using tcsh in jaguar this is the line I had:

setenv PATH /usr/X11R6/bin:/usr/local/bin:$PATH
 

MisterK

Registered
well this always worked for me and still does:

set path = ( $path /usr/local/bin ) or whatever directory you wanna add. oh yea dont forget to rehash after you used this command.
Also if you want to make it permanent add it to your /.tcshrc file. Just open it (vi ~/.tcshrc or any other editor) then add the set path line, save the file, and rehash or open another terminal window. (this is for tcsh shell only for bash or sh it would be slightly diffrent)
 

endrest

Registered
Hey,
I got the same error in my bash/csh shell.
This is one of the solutions to it.
setenv PATH $PATH":$HOME/bin"
This is the only solution. This worked for me where no other string did. The double quotes are the trick.
 
Top