I am currently trying to find the full directory name of a script I am calling. I found code online that uses:
DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )"
to set the directory, then afterwards, I try to open a file by calling:
open ${DIR}/file_open.jpg
to which I get -bash: /Volumes/Drive: No such file or directory
. I am unsure why this doesn't work. I am running it from Mac OSX's terminal. Does anyone have any ideas?