Am Sonntag, 6. November 2011, 21:22:57 schrieb Dimitar Popov:
Hi Ralf,
I modified your script a little, and came with the following shorter solution:
FILE="${BASH_SOURCE[0]}" while [ -h "$FILE" ] ; do SOURCE="$(readlink "$FILE")" FILE="$(dirname "$FILE")/$(dirname "$SOURCE")/$(basename "$SOURCE")" done BASEX_DIR="$( cd -P "$(dirname $FILE)" && pwd )"
Could you give it a try and tell me if you see any problems with it?
Many thanks in advance!
Dimitar
Forget it... it doesn't work correctly.
Dimitar