For example there is a long path that I
cd to very often. How do I store the path in a variable so that I can use it everytime?
For example: I wan to be able to do this
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
If you just want to use the path for one session, set the variable as usual
You can then
cd "$long" as often as you like until the shell terminates or you set
If you're interested in the variable being available to processes run from the shell session you should set it in your environment
setenv long "/some/long/path/to/a/directory"
If what you want is for the variable to be available to every session, instead of just the current one, you will need to set it in your shell run control.
Then add the
set line or the
setenv line shown above to automatically set the variable or environment variable for every session of csh.