OnCallReadyStart learning

realpath: print the resolved absolute pathname

realpath [OPTION]... FILE...

Options you will use

-e, --canonicalize-existing
All components of the path must exist.
-m, --canonicalize-missing
No path components need exist or be a directory.
-s, --strip, --no-symlinks
Don't expand symlinks: only tidy the path (., .., repeated /).
--relative-to=DIR
Print the resolved path relative to DIR.
--relative-base=DIR
Print absolute paths unless the path (and --relative-to) is below DIR.
-q, --quiet
Suppress most error messages.
-z, --zero
End each output line with NUL, not newline.

Examples

$ realpath --relative-to=. /var/log/syslog

the path to a file you know absolutely, as seen from where you are

$ realpath --relative-to=/etc/nginx /etc/ssl/certs

../ssl/certs - handy for relative symlinks: ln -s "$(realpath --relative-to=DIR TARGET)" DIR/name

$ realpath -m /no/such/../dir

/no/dir - tidy a path that does not exist (yet)

Gotchas

Try realpath in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.