I want to have a bash-script discover its own path.
The background is that I have a script called
process_scanned_text.sh, which itself uses the script
curves in the same directory as
process_scanned_text.sh. I created a symlink to
process_scanned_text.sh in my
~/bin folder. Now I don't know how to correctly call the
curves script. As it is not in
$PATH, I need to specify it's path. Using dot as path is not correct as this points to the directory from which I call
dirname $0 does not work either as this points to my
bin folder (where the symlink is).