Bash
Code snippets
To convert a relative path to an absolute path:
readlink -f -- "$apath"
-f - Resolve to a target’s full path
Credit: StackOverflow
Useful links
-
Using brackets
()instead of{}for functions will run the function in a sub-shell.