Resolve the real absolute path.
realpath
resolves a relative path or a symbolic link to its real
absolute path.
Resolve the real absolute path.
source "${BASH_SOURCE[0]%/*}/libs/biapy-bashlings/src/realpath.bash"
file_path="../relative/path"
file_realpath="$( realpath "${file_path}" || echo "${file_path}" )"
- $1 (string): A path to resolve.
- 0: If successful.
- 1: If argument is missing or more than one argument given.
- 1: If realpath not found.
- The resolved absolute path, or empty string if realpath not found.
- Error if argument is missing or more than one argument given.