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
Create the script file
#!/bin/sh # file : /scripts/cdjava # cd /home/askgelal/projects/java
Then create an alias in your startup file.
#!/bin/sh # file /scripts/mastercode.sh # alias cdjava='. /scripts/cdjava'
For example, create a master aliases/functions file: /scripts/mastercode.sh
(Put the alias in this file.)
Then at the end of your .bashrc file:
source /scripts/mastercode.sh
Now its easy to cd to your java directory, just type cdjava and you are there.