http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-dir...

...ectory-its-stored-in/246128#246128

The solution suggested in the comments of the best answer solved a bug (which crashed the script) when calling run_zotero.sh from another directory.