pathfile.bash
#!/usr/bin/env bash
# Full path to file
echo "$(cd "$(dirname "$0")"; pwd)/$(basename "$0")"
# Full path of the directory the file is in with trailing slash
echo "$( cd "$(dirname "$0")" ; pwd -P )/"
# current directory name, not the path
echo "${PWD##*/}"