Originally Posted by deepti_114
When i do: "ls -al $HOME/.tcshrc" - it says no such file.But its not at $HOME that is my working directory.
I think this is the problem. Whatever your working directory is, the shell looks for configuration files in the user's HOME directory. If you need to have these environment variables set at each login, you should stick with the $HOME/.tcshrc file.
Regarding the not-working script, take in mind that if you execute
a script, all its variables have a local scope and the environment defined with setenv is available only to its childs. Once the script exits, all its variable are lost (be they assigned using set or setenv). Instead you have to source
the script if you want the environment be retained permanently in the current shell:
Sourcing a file means to execute every line as if you write it in the current shell. Hope this helps.