Possible Duplicate: Can a Bash script tell what directory it's ... Try: SCRIPT_DIR= $(readlink -f $(dirname ...
stackoverflow.com