Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
bash:: get path of current file
#!/bin/bash
## @from: https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.