1. Don't forget that ` is not the same as '.
The below statement sets the variable currentdirectory to the results of
the pwd command.
currentdirectory=`pwd`
2. You can either grep it through a case statment or you knuckle down
and learn regular expressions which I've not yet done either. ;-)