When running a bash script, it’s sometimes convenient to get a fully qualified path to the directory that the source of the running script is in.
I continually have to remind myself of the exact syntax for this tip, so I’ve posted it for posterity. This approach should work around most issues of symlinked files, sourced files, etc.
Here’s the snippet:
|
|