I\'m trying to write a small script to change the current directory to my project directory:
#!/bin/bash cd /home/tree/projects/java
I save
You can do following:
#!/bin/bash cd /your/project/directory # start another shell and replacing the current exec /bin/bash
EDIT: This could be 'dotted' as well, to prevent creation of subsequent shells.
Example:
. ./previous_script (with or without the first line)