printf '%s/%s\n' "$(pwd -P)" "$(basename "$0")"
This approach breaks if you run the script from a symlink.