2
2
I want to create a new instance of tcsh
and source an arbitrary script, all in one step. The problem is that when I use the -c
option, the shell instance closes as soon as the script is complete. So, in the following trivial example the pushd
command completes successfully but then the shell exits:
tcsh -c "pushd ~/some/directory/of/interest"
How can I source a script which modifies the environment and then work interactively within that environment? This is most useful when used in conjunction with programs like ssh
or screen
, as in the following:
ssh -t user@host 'tcsh -c "source ~/test_environment.csh"'
This is a very nice, straight-forward workaround! It requires modifying the user's
~/.tcshrc
beforehand, but that is not a problem in my scenario. – nispio – 2015-08-26T19:37:49.510Glad to hear it was successful! Thanks for catching the error, fixed that equal sign. – ssnobody – 2015-08-26T21:07:07.103