I recently wanted to make a handy bash alias to change into a directory. Specifically I wanted to access the local
/scratch directories of our HPC cluster nodes, which are mounted via autofs on the mother node.
This problem can be solved by declaring a bash function (put it in .bashrc or .alias for example). The following code works with the SGE queueing system. From the jobid as argument it extracts all necessary information and finally executes a change-dir command.
If you want to adapt it to your local SGE environment, you would at least need to adjust the hostname (.ibp.cz) and the path to the mounted scratch directories.
The function is executed in the terminal with the jobid as argument as follows:
Hope it helps someone.