Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 2 large commercial programs that work together come with fairly involved .cshrc scripts. But whether I am in a bash/tsch/csh shell at start up, my initial path on startup is in bash format. When I run the .cshrc scripts that set the paths (and variables) for the programs support files, the system ignores the paths set via the cshrc script.

Example from the echo $PATH command Note, I get same results if I start up in a bash or csh shell.

initial path /usr:/usr/bin

after cshrc /usr:/usr/bin /home/program1 /home/program2

since I can't alter their scripts, what can I do to change the path to 1 format? Either: /usr:/usr/bin:/home/program1:/home/program2 or /usr usr/bin /home/program1 /home/program2

Thanks,

share|improve this question

1 Answer 1

In BOTH csh or sh varients PATH is an environment variable and will look identical.

You are confused with setting $path (notice lower case), these are local to the csh environment and will look differently.

FYI, setting environment variable on sh and csh varients are:

sh: PATH='a;b;c;d;e';export PATH

csh: setenv PATH 'a;b;c;d;e' -OR- path='(a b c d e)'

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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