I'm almost embarassed to ask this but I'm stuck. I have, within my home directory a directory called work and then with in that my company, and with in there a directory for each project.
$HOME/work/mycompany
project-a
project-b
...
project-n
I've created a script (if you can even call it that!) and put it in my $HOME/bin folder. THe idea is that I will be able to type mycompany project-x from anywhere in the terminal and have my directory location changed to the work directory. My script has this right now ---
.. with the intention of trapping the arguments once I see this working. I put some echo statements in originally to make sure that it was running, which it is, however, I never change location -- the script ends and I am still where I was when I ran it.Code:#!/bin/bash cd $HOME/work/mycompany
What am I missing -- i know it's something simple but I can't see it.
Bookmarks