0

I'm having an issue with cleartool commands called from my .tcshrc. I try to call cleartool setview, but get a cleartool: Command not found error. however, when I call the command from the terminal, I don't get this issue. My default shell is set to tcsh, and I have csh, sh, tcsh all present in my /bin dir. What could be causing this issue?

My $PATH when output from the init script is as follows:

/usr/lib64/qt-3.3/bin:/usr/share/centrifydc/bin:/usr/local/bin:/bin:/usr/bin:/opt/dell/srvadmin/bin

The path when echo'd from the terminal is significantly longer; I can't show the whole thing because it's on a corporate system but it does contain /opt/rational/clearcase/bin, so I believe this is the problem but I don't know how to get the script to recognise the longer path.

The script works if I add a line to my script to add /opt/rational/clearcase/bin to $PATH, but I'd like to be able to permanently add this to my shell path.

5
  • 2
    At the point where you use cleartool setview in your .cshrc please add echo "$PATH". Repeat this in the shell when the command works for you. Report both in your question. I expect that the $PATH has not been fully set at the point you try to use the command in your initialisation script Commented Jun 5 at 20:24
  • @ChrisDavies what do you mean by 'when the command works for you'?
    – Clinton J
    Commented Jun 5 at 20:46
  • @ChrisDavies I was able to get it working by adding a line to my script that adds cleartool to my C shell path. for some reason I'm the only person on my team with this issue, is there a way to permanent amend the C shell path so I don't need this line?
    – Clinton J
    Commented Jun 5 at 21:08
  • What did you do in your script to add this missing directory to your $PATH? Commented Jun 5 at 21:42
  • @ChrisDavies setenv PATH $PATH\:/opt/rational/clearcase/bin
    – Clinton J
    Commented Jun 11 at 18:08

1 Answer 1

0

To make the change permanent you simply copy the line you use interactively the end of your .cshrc (or .tcshrc):

setenv PATH $PATH\:/opt/rational/clearcase/bin

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .