I know that csh has a lot of start-up files (.login, .cshrc, etc.). The problem is that I'm starting a new csh terminal and I'm seeing a lot of non-standard (not the standard ones like $HOME, $SHELL, etc.) environment variables set at start-up that I didn't set in any of my start-up scripts. Is there a way to figure out the sequence of files that get sourced at start-up in my current session. If not, is there even a facility that tells which script sets some environment variable given the variable's name?
As mention Few options can help you. Together with "strace", they can help you identify which command file contributes
You can use the following to check startup sequence for the 4 combinations of login/interactive:
strace -eopen,close csh -V -c "exit
strace -eopen,close csh -V -i -c "exit"
strace -eopen,close csh -V -l -c "exit"
strace -eopen,close csh -V -i -l -c "exit"
While this does not explicitly show which file contribute the environment variables, it's should provide you with good leads.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With