Bash
Load environment from .env
file
export $(cat .env | xargs) && my-program
Get scripts directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
Sane shell script
#!/bin/bash -eo pipefail
.env
fileexport $(cat .env | xargs) && my-program
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
#!/bin/bash -eo pipefail