fi
# Is the awk/ls magic portable?
if [ -L "$fullpath" ]; then
fullpath="`ls -l "$fullpath" | awk '{print $11}'`"
fullpath="`readlink "$fullpath"`"
dirname $fullpath
}