Last active
October 30, 2020 17:18
-
-
Save Calinou/b7703bac1ac048416f0adf36f801d261 to your computer and use it in GitHub Desktop.
Bash script boilerplate (safer programming practices + allow running from any location without using `cd` beforehand)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment