In /usr/local/bin I have a 'ln -s' to /usr/local/foo/bash.script, and in this latter script I want to know the current /usr/local/foo directory, so that I can run a secondary script from that folder.
Now, I tried dirname $0, but that gives me the /usr/local/bin folder instead. What should I be using in the bash.script to get the /usr/local/foo folder?