/ Published in: Bash

Check out the bash command 'shopt -s cdable_vars' From the man bash page: If set, an argument to the cd builtin command that is not a directory is assumed to be the name of a variable whose value is the directory to change to.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# in .bash_profile or other suitable location shopt -s cdable_vars export ne="/etc/network/" # in the shell source .bash_profile # (just this once, to reload the edited file) cd ne pwd # /etc/network/
URL: http://www.macosxhints.com/article.php?story=2005031814311425
Comments
