How would I create an environment variable (maybe that's not the right word?) to use as a shortcut for very long paths? However, I don't want it to be the full path. I know how to set the absolute path in bashrc but what I want is something like:
This works exactly as you think it would. If you define
then you can use it like
In all shells started as a child of the shell where you defined the variable. If you want to make it persistent you would put it in profile or bashrc scripts, so it is set on each login.
NB: if you want to concatenate letters after the variable you would have to use this:
and finally, if it contains blanks it does not hurt to quote the variable (but dont use '' for this):